Book Image

Internet of Things with Arduino Blueprints

By : Pradeeka Seneviratne
Book Image

Internet of Things with Arduino Blueprints

By: Pradeeka Seneviratne

Overview of this book

Table of Contents (15 chapters)
Internet of Things with Arduino Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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