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:
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.
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:
My goodness! It's the compelling moggy, destroyer of mice. Will she shun me again or will she notice me?. pic.twitter.com/TUzm9V3Spl— Daphne's Catflap (@DaphneFlap) October 26, 2015
So arrives the ineffable Daphne, most intrepid mouser. I can die content. pic.twitter.com/wk7FW1zmu7— Daphne's Catflap (@DaphneFlap) October 23, 2015
Gadzooks! It’s Daphne, bravest of hunters. Oh, bliss!. pic.twitter.com/j9Xs5LYzQ3— Daphne's Catflap (@DaphneFlap) October 27, 2015
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.