I’m new to software programming and have a need to store or log the data produced by Enviro+ either on the RPI SD Card or recording off the boards during my research events. I’m sure this question has been asked and answered before but my searches through this forum has not located such. Can someone help with a link to any such or similar procedures/software, either within this forum or out? THank-you for reading and consideration.
At some point I’m going to be doing something similar with a weather station I’m building so I’m going to tag along and see what you end up doing.
@sandyjmacdonald I think is the guy to talk to.
He has put some pretty cool graphs up on Twitter of his sensor data.
Me, I just want to save the data, and then view it on another Pi. MQTT maybe how I go. Very early days for me yet, it’s not built yet.
Have you had a look see in the Learn section?
Projects, tutorials, reviews, and more for todays digital Makers (pimoroni.com)
I found this, it has info on Data Loging
Getting started with Enviro pHAT (pimoroni.com)
I’m using InfluxDB and Grafana, running on a separate Raspberry Pi 4, for storing and viewing the data from my various Enviro boards. I’m then using a simple little Python script that runs on each of the Raspberry Pi Zeros, to send the data to the Raspberry Pi 4 using the influxdb Python library.
The three Raspberry Pi Zeros with the Enviro boards (two normal Enviro boards indoors, and one Enviro+ outdoors) run a cron job every 5 minutes to run the script that sends the data to the Raspberry Pi 4. The other one, which is my weather station, is a bit more complex so it runs a script constantly to collect and average data over 5 minute periods then send the data every 5 minutes.
I really need to write all this up at some point but it’s such a lot of work, and the Raspberry Pi stuff (well… apart from the photography) is back to just being a hobby now that I’ve moved back to working full time at the University.
I do recommend InfluxDB though. It’s really good for time-course data, and there are very good Python and R libraries for both logging and querying the database. I’ve got a couple of R scripts that pull various bits of the data out of the database and make pretty graphs, like the one attached here.
Oh, one other thing. If it’s for research then I’d recommend backing the data up somewhere else every day. I have another cron job running on the Raspberry Pi 4 with the InfluxDB database, that does a database dump and then backs it up to my Dropbox. That way, if the Raspberry Pi 4 dies for some reason, then you’ve got a backup of the data that you can restore from. The last thing you want is to have spent ages writing the code and collecting the data only to have it all be lost.
Related: one of my Raspberry Pi Zeros’ SD cards died suddenly on me the other day. After two years of constant read/writes it’s not surprising really…
Thank you sandyjmacdonald, I’m researching cognitive decal (loss of decision making) and memory recall (forgetfulness) during long-duration spaceflight, and have four Envior+ attached to PI4s with batteries being recharged by pi-juice boards. The 12h image you provided above is what I’m seeking for all measures. My boards (systems) are self-contained in new spacesuit prototypes and operated while humans (astronaut candidates) are performing mission reverent tasks while wearing wireless 32 channel EEG systems.
Can you share the script that is running on the RPIZeros? in the meantime, let me research InfluxDB and Grafana.
Thank you, everyone, I’m a hardware engineer and this research is supporting my PhD. I’m learning software as time allows so please forgive if I ask stupid questions.
Thank you Alphanumeric, that is where I started initially. thanks.