Hardware Reference
In-Depth Information
You could extend the logging program to send a tweet when one of the sensors was broken
so that you knew it was worth watching the box. A good starting point would be to modify
the code from Chapter 10, “he Twittering Toy”. Look online for further documentation
about the Twitter API - the PostUpdate function can help. Here's a hint:
api.PostUpdate('Bird Activity detected!')
A development of this would be to take a photo or short sequence of video when the beam is
broken. You can execute raspistill or raspivid from Python to control the Raspberry
Pi camera. Chapter 10 shows how to call an external process. Look on the Raspberry Pi
forums or search Google for more information about controlling the camera.
If you don't have a bird nest box, you could it the sensors to a bird feeder, or to the entrance
of a box on the loor containing bait to capture rodents coming in and going out.
Sharing Your Data with Others
How does your bird data compare with the data collected by other people?
You could share your photos or activity graphs by uploading them to a web server, perhaps
over FTP or ssh if you are familiar with these. If you use Google Sites or WordPress, there are
APIs available to transfer images. You could look at Chapter 15, “Facebook-Enabled Roto-
Sketch” and use that as a basis to publish to Facebook.
You could set your Raspberry Pi up to be a wireless access point, run its own web server and
check on your birds from your smartphone.
If you are really feeling adventurous, why not write a web application that stores bird activity
data and plots it on a graph, or as an overlay on Google Maps? You would have to design your
own API that would allow Raspberry Pis to submit their data.
Adding More Sensors
You could interface your Raspberry Pi to more sensors. he Raspberry Pi bird box used on
Springwatch also recorded data from a weather station. his allowed trends in bird activity to
be linked to changes in the weather conditions. You could also add more instrumentation to
the nest box, perhaps recording the temperature and humidity inside. Search online for
information about interfacing analogue sensors to the Raspberry Pi.
Search WWH ::




Custom Search