Introduction: Tweet Switch
The purpose of this tutorial is to teach people how python (Twiitter API) can be used together with the Arduino to Switching on A Led Light using Twitter Account. My inspiration for this project comes from the project Tweet-a-Pot-Twitter-Enabled-Coffee-Pot. This is a beginners project. For anybody using the Arduino for the first time it will be no be difficult to grasp the concepts and the codes in the project.
I shall use the following materials
Arduino Uno board
One LED light
USB cable ,
Twitter account (Developers Twitter page)
Python 2.6 or 2.7 (Download Python)
Alternative Pycharm
Tweepy (GitHub Tweepy)
Pyserial (Download Pyserial)
Step 1: Arduino Setup
For this tutorial i will be using an Uno Arduino Board. One LED light and Usb cable. Place the LED light on the pin 13. No specifics for the color of LED's. The End result should be like that of the Image. The short pin goes on the GND (Negative) while the long pin on the LED goes on pin 13 (Positive).
Step 2: Create a Twitter Application
If you already have a twitter account headed over to dev.twitter.com and login with "YOUR" twitter account. For those who may not have a twitter account, create one account ASAP and follow me lol just kiddin. The second stage is to create a twitter application. All the necessary steps are available on how to create a twitter application.
Step 3: The Python and Arduino Code
Once done creating the twitter application.Insure that python has been installed (2.6 or 2.7), including Tweepy and Arduino. Once that done user may proceed. Open the python script and replace every words such as "consumer key, consumer secret key, access token, access secret key, within their very own keys. Don' t forget to replace the Arduino serial. Last but not the least, change the Username or twitter handler "status = api.user_timeline('YOUR TWITTER HANDLER')" . Don't change anything in Arduino script.
Step 4: Running the Program
This is the last part of the tutorial. Once the you have double checked that everything is ok both with the hardware and software. Click the "Run" button on the python and select "Run model".