Integrating twitter to the Raspberry Pi

Here’s a video of the system working:

I wanted to create a way to push data from my Raspberry Pi monitoring plant growth to myself. Instead of creating an email server and sending emails, or setting up an sms client, I decided to install tweepy and use twitter and python to send me the data.

First thing’s first, I had to create a dummy account (@eso_rpi) and sign up for the Twitter Dev Program, which is a free way to access the API. You will need to generate a set of consumer keys and access tokens for your app. The process is pretty simple, and the tweepy example is pretty straight forward. If you run into trouble you could easily google it as the process is pretty well documented.

Here’s my code, you will need to download and install tweepy and apscheduler for this to work:

The wiring diagram is the same as it is here, except there is an ldr connected to port 1:

There you go!

Leave a Reply