O'Reilly logo

IoT: Building Arduino-Based Projects by Drew Van Duren, Brian Russell, Pradeeka Seneviratne, Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Tweet-a-Light – Twitter-Enabled Electric Light

In Chapter 1, Internet-Controlled PowerSwitch, we learned how to control a PowerSwitch Tail (or any relay) through the Internet by using the Arduino Ethernet library. Now, we will look into how Twitter tweets can be used to control the PowerSwitch Tail.

In this chapter, we will learn:

  • How to install Python on Windows
  • How to install some useful libraries on Python, including pySerial and Tweepy
  • How to create a Twitter account and obtain Twitter API keys
  • How to write a simple Python Script to read Twitter tweets and write data on serial port
  • How to write a simple Arduino sketch to read incoming data from serial port

Hardware and software requirements

To complete this project, you will require the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required