This Tiny Raspberry Pi-Powered OLED Companion Cat Hammers Away at the Keyboard When You Do
Triggered by keyboard key presses, transmitted over the network, this Keyboard Cat will help keep the typing flowing.
Pseudonymous maker "legrandbingus," hereafter simply "Bingus," has a little friend to keep them company while they type away at their computer β in the form of an interactive Keyboard Cat animation displayed on an OLED panel.
"[I] had the idea of making a little OLED keyboard companion for a while," Bingus explains of the project, "so when the parts came in I immediately went to work: [A Raspberry] Pi, OLED screen (I chose an I2C screen for an easier setup), and an adequate USB power supply."
The animation on the display is a variant of Keyboard Cat, spun off from the original keyboard-"playing" feline Fatso β recorded in 1984 by owner Charlie Schmidt and given a new lease of life when uploaded to YouTube in 2007 β with a cartoon cat hammering away at a small music keyboard. What makes the companion clever, though, is it works by reacting to typing on the real keyboard.
"[A] script currently displays different frames for different key-presses, retains a frame for a repeating key-press, and has a separate frame for the space bar," Bingus explains. "There's a Python script running on the PC that uses the keyboard module for logging keystrokes and uses the socket module for IP."
That IP connectivity sends the keystrokes to the animation server, running on a Raspberry Pi 3 Model B+ connected to the network. "I didn't have any [Raspberry] Pi Zeros left for serial interfacing," Bingus explains. "I also thought about putting the Pi in-between the keyboard and PC and split/read the USB signals but decided not to as I don't have my equipment setup for that at the moment."
More details are available in Bingus' Reddit thread, but while the maker has pledged to upload the source code to GitHub in the near future it had not been publicly released at the time of writing.