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

Chapter 2. Working with the Firmata Protocol and the pySerial Library

In the previous chapter, you learned the fundamentals of the Python programming language and the Arduino hardware platform so that you could get started. If you are reading this chapter directly without going through the previous chapter, it is assumed that you have some level of expertise or working experience with these technologies. This chapter describes two important components that are required to bridge Arduino with Python:

  • The Arduino Firmata protocol

  • Python's serial library called pySerial

Although the Firmata protocol is useful to interface Arduino with Python, it can also be used as an independent tool to develop a large variety of applications.

It is time to take your Arduino hardware out and start getting your hands dirty. During the course of this chapter, you will require an LED, a breadboard, and a 1 kilo-ohm resistor as well as the components that you already used in the previous chapter, that is, Arduino...