pimoroni / grow-python

Python libs for controlling the Grow HATs
MIT License
55 stars 44 forks source link

Logging sensor data in time #22

Open ThSGM opened 2 years ago

ThSGM commented 2 years ago

Hi,

I'd like to include a code snippet in examples/monitor.py so as to output the sensor data every X minutes onto an external file. For example, in a CSV format of the form:

timestamp sensor1 sensor2 sensor3

Can I get some recommendations on how this might be done? I can paw my way around Python code, but I'm not sure where is the best place to put such a snippet, nor am I sure how to design the timings.