There’s a catflap on Twitter and you’re going to want to follow it

"So arrives the enticing Daphne, slaughterer of spiders"

We follow a lot of weird accounts on Twitter, from the perpetually angry @GetInTheSea to the brilliant brand parody, @ShippamsPaste. But our new favourite is even stranger – it’s a catflap. Tweeting at @DaphneFlap, the catflap belongs to the very regal Daphne (who’s also on Twitter), beloved cat of tech journalist Kate Bevan. The tweeting catflap is a joint project between her and software developer Bernie Sumption, using the tiny Raspberry Pi PC. Here’s how it works, in the medium of Jenga:

Image: Bernie Sumption

Using a reed switch (an electrical switch that uses a magnetic field to make a connection between two metal rods) duct taped to the catflap, the software designed by Bernie tells the hilarious-looking webcam to take a picture as Daphne comes through the catflap.

The webcam. Image: Bernie Sumption

Then, there’s a whole file of sentence fragments that can be compiled into a tweet to go with the photo. Here’s a section of the file:

Then, Bernie’s Python code (he uses Python because it’s “easier to program in while tipsy”) combines the photo and sentence fragments into a tweet and posts them to the Twitter account:

  All together now: squeeeeeee! Daphne’s catflap is a really lovely way for someone who’s not at home much to ‘check in’ with their cat, emotionally at least – it’s a nice reminder that she’s fine and doing her own thing while you’re at work. Sometimes she’s in and out a lot, sometimes it’s hours between tweets, but I love seeing her furry little face in my feed, and I’ve never even met her. So is this something other cat owners could easily do? Bernie told us: “The software took about two afternoons to make, and in the 2 years it’s been running I’ve probably spent the same time again fixing it when it randomly breaks or Daphne deliberately sabotages it. Most of the work was just strapping together programs made by other people – a Twitter client from here, a webcam controller from there, etc. The Raspberry Pi has lots of free software, but it’s all made by volunteers and can be buggy and undocumented, so be prepared for a bit of head scratching and a few dead ends. That said, it’s a great project for a beginner with some determination. The only specialist thing I wrote myself was the generative grammar program that makes the tweet messages, and if anyone wants to use that in their own project I can give them a hand getting it running. I had the Pi and the webcam already, so the project cost me around £5 for the burglar alarm sensor and wires, plus £35 for two afternoons’ worth of beer and pizza.” Seems reasonable. There’s a more detailed guide to how it’s done on Bernie’s website, and we wouldn’t be at all surprised to see a Twitflap spring up on Indiegogo sometime soon. At the time of writing, Daphne’s Catflap has just under 300 Twitter followers and last tweeted 4 minutes ago, noting that Daphne’s nose is apparently particularly pink and moist today. Aww.

Main image: Daphne, courtesy of Kate Bevan.

Holly Brockwell
About Holly Brockwell 291 Articles
Tech addict Holly founded Gadgette in 2015, and won Woman of the Year for it. She's firmly #TeamAndroid, has ambitions to become a robot, and beat all other Hollies to her awesome Twitter handle.