For the last couple of lunchtimes I have been working with my technical director Alan to create a bubble machine that could respond to our social media presence.
Meet Mr P
We brought a kids bubble machine for a couple of quid and modified the switch on top so it was linked by a transistor. This transistor was then enabled and disabled by the GPIO socket on a Raspberry Pi, which we then switched on and off using a simple node.js program.
The Twitter API has two REST callbacks which are were helpful for us to respond to our presence.
I wrote the program to poll these callbacks every minute and to detect any changes.
Lastly, the program also posts to our company Slack channel, detailing what Mr P is excited about.
Here’s a copy of the source code and here’s a video of the little guy in action.