Paul Navarro's Arduino to CSV API Aims to Simplify Your Sensor Data Collection
Just connect your Arduino or compatible and this clever Python program will hunt it down and start logging readings to a CSV file.
Developer Paul Navarro has put together a Python-based application programming interface (API) designed to make it easier to log data from an Arduino or compatible microcontroller in Comma Separated Value (CSV) files — no additional hardware required.
"Save CSV files with sensor data on you[r] computer, no shields or additional devices needed," Navarro writes of his creation, the sensibly-named Arduino to CSV API. "[It's a] serial comm-based Python script and Arduino code. Automate data collection over serial ports, provide your own config and timing. Change timestamp format, prefix, suf[f]ix, timed or enumerated output in the config.json
file."
The project is designed to automatically find an Arduino connected to the host machine and sit listening to its serial output. When data is detected, it's automatically saved into the specified CSV file — and the API includes support for creating loggers with different baud rates and connection settings, limiting its auto-scanning to selected serial ports, manually connecting to specified ports — handy in a multi-Arduino scenario — and writing to files with customized names including timestamps.
The source code for the API, for both the Arduino side and the Python-using host, has been published to GitHub under an unspecified open source license.
Main article image courtesyof Arduino.