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 6. Storing and Plotting Arduino Data

Sensors that are connected to Arduino produce lots of analog and digital data. Analog sensors produce data points as numerical information while digital sensors produce Boolean values, that is, 1 (on) or 0 (off). Until now, we printed this data as a string on the command prompt or displayed it in a GUI. The data was being printed in real time and it was not being saved for any further analysis. Instead of using the string format, if the data is printed as a plot or graph, it will provide useful information for us to rapidly understand it and derive conclusions. Plots are even more useful for real-time applications as they can provide information regarding the system's behavior for better understanding of the data.

This chapter is organized around two major sections: storing the Arduino sensor data and plotting this data. We will start by creating and manipulating files using Python. After that, we will work with methods for storing Arduino data...