Book Image

Python Programming for Arduino

Book Image

Python Programming for Arduino

Overview of this book

Table of Contents (18 chapters)
Python Programming for Arduino
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Stage 2 – the Python code to process tweets


As the user is interacting with the system at the level of the Twitter application, we do not require a deployable computation or control unit for this project. Due to this, we can just use any computer capable of hosting Python and Mosquitto as the computation unit. You still need to ensure that the unit is always on and connected to the Internet, otherwise the system will not work as expected. For simplicity, you can deploy the system on the Raspberry-Pi-based control center that you developed in the previous project, or even on the Amazon AWS server. For the development stage, let's start with the regular computer that you have been using all along. We are assuming that this computer has the Mosquitto broker installed and running. Note down the IP address of this unit, as you will need it in the Arduino code that you developed in the previous section.

Python software flow

The Python code deals with two services during execution, the Twitter API...