Working with the Raspberry Pi camera module
Fixing cron Issues
If you have any cron jobs running on the Raspberry Pi, you may find that from time to time you get an email with the error output of a cron job. These kinds of messages are usually sent as internal emails within your Raspberry Pi system; however, when you enable the external email setup using ssmtp, it means they will now get sent via your Gmail account, and you might start to see a build-up of cron-related emails in your Gmail account.
To stop this from happening, redirect the output of the cron job to /dev/null
. To do this, you can edit your cron jobs using the following command:
$ crontab -e
Then, find the cron job that you want to disable email output for and add the following code to the end of the line:
>/dev/null 2>&1
So, the line will end up looking like this:
0 1 5 10 * /path/to/script.sh >/dev/null 2>&1
Save and exit the file. You can re-enable the notifications at any time by removing this code from the end of the line.
Other Useful Applications
As with all things Raspberry Pi, since the release of the camera board there have been a number of ingenious inventions utilizing the neat little board.
Some of my favorites include the Rapiro Robot [11] (see the article on Rapiro elsewhere in this issue) and the Ziphius [12] – two wildly successful Kickstarter projects featuring some very "cute" looking robots and (you guessed it) the Raspberry Pi camera module.
Some software tools have also appeared that make interfacing with and utilizing your Raspberry Pi camera module an absolute breeze.
Pi Vision [13] is a neat bit of software developed by B.J.Rao at heywhatsthebigidea.net. Pi Vision provides a GUI for the Raspberry Pi camera module that is easy to use but also lets you know what is going on behind the scenes, as the commands used by the GUI are relayed to the user as they are run. The Pi Vision application was originally developed as a way to get the creator's children interested in the Raspberry Pi, and it is a great example of allowing people to learn by doing something fun!
BerryCam (by Jim at Fotosyn) [14] is an application for iOS that allows you to operate the Raspberry Pi camera module remotely through your smartphone or tablet.
The BerryCam app (Figure 5) uses a Python handler script in the background on your Raspberry Pi, which checks for requests from the application and responds to commands on the GUI. It is then possible to save pictures you capture with the camera module directly onto your Apple device.
Pi Sight [16] is a new application announced by Pi Supply (but not released quite yet) that is essentially an Android version of BerryCam. In fact, it was designed to use the same handler script as BerryCam, so that those with a mixture of devices do not need to set up multiple scripts running on their Raspberry Pi.
Pi Sight should be available in the next couple of weeks for those willing to sideload the app, and it will eventually be available through the Google Play store for free.
Buy this article as PDF
Pages: 2
(incl. VAT)