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

Prototyping templates using Firmata


The goal of this section is to provide prototyping templates while also explaining various Python methods and programming techniques. It tries to cover some of the most popular sensors with coding examples that are used by DIY Arduino projects. This section is designed to utilize the Firmata protocol to implement these Python programs. It also includes various Python programming paradigms such as working with indefinite loops, creating custom functions, working with random numbers, acquiring manual inputs from prompt, and so on. These prototyping templates are designed in such a way that they can be easily included in large projects or they can be blueprints for a larger project that can be developed around them. You learned about the pyFirmata package comprehensively in the previous section and we will only utilize those pyFirmata functions in the upcoming examples. An alternative Python library that supports the Firmata protocol is covered later in the...