TUTORIALS Camera trap
Build a camera trap with the BlueSky API
PI CAMERA
Still wrapped up warm, Les Pounder is sending images to the BlueSky using a Pi 5 and Camera Module 3.
OUR EXPERT
Les Pounder is associate editor at Tom’s Hardware and a freelance maker for hire. He blogs about his adventures and projects at http://bigl.es.
YOU NEED
Raspberry Pi 3,4 or 5 Pi Camera PIR sensor (obstacle sensor is ideal) 3x M2F jumper wires Code: https://bit.ly/lxf325code
Unless you’ve been living under a rock, you can’t have escaped the ‘xodus’ of users from X/Twitter to BlueSky. This got us thinking about BlueSky APIs (application programming interfaces) – does it have one? It turns out it does and it led us down a rabbit hole of tinkering with the API and Python.
The result of that tinkering is this project, where we use a Raspberry Pi and a sensor to trigger a sequence of code that takes a photograph of an intruder using the Raspberry Pi Camera. It then sends that message to BlueSky using the current date and time as a filename, and as the main part of the message.
This is a fun and simple project, but we advise that you don’t use this code with your main account, or you may generate spam and find your account blocked. If you want to set up a bird feeder, trailcam or timelapse, this code can be adapted to do just that.