Timelapse-tweeter, a RasPi twitter accessory

15 Oct 2016

Raspberry Pi Camera accessory script - timelapse-tweeter

Timelapse, one hour

For a recent gig, I needed to take regular photo observations of a small space and make them quickly reviewable. So I write the bones of what became the script package I’m sharing here—to round it out I added an upload-to-Twitter function and a(n optional) Pinboard entanglement.

Here is the script package, have at it and make your own!

The package uses your Raspberry Pi’s camera and takes a photo every minute. From all these photos, each hour it makes a timelapse GIF and posts it to Twitter. I have mine pointed at my hydroponic garden, as well as at a small noise-monitoring toy that I built awhile ago. (And if you are curious, the other RGB LED strip, the vertical one, is a dumb clock I made that I find quite handy in the mornings, when only a rough sense of time is needed). The script avoids filling up your drive by only recording images to a 60-minute rolling buffer.

The GIF-creation is something I spent awhile researching in order to make small, efficient, well-rendered GIFs from full-res camera images. It first generates a custom pallette by sampling an intermediary .mov file, and this really improves the resultant filesize. Weirdly, Twitter renders the submitted GIF as a .mp4 movie file, but it looks nice, and it’s Saturday night and the Cubs just won so idgaf.

Because I am interested in the ambient, second- and third-order signals we sense and transmit, I decided to add a random sample of my recent Pinboard tags, sort of a riff on my CLIP-E project and other “semantic listening” work I’ve been toying with. Some folks might call this a “bot,” but I think that would be a bit sensational, don’t you?

If the script doesn’t work for you, feel free to open a Github issue and/or update that issue with the solution, when you find it!

A timelapse tweeted

Published on 15 Oct 2016