SGP30 Air-Quality alert Rasperry Pi

Bonjour mon ami's

I'm about to build an Air-quality alert, using the Adafruit SGP30 sensor on an Arduino Uno connected to a Raspberry Pi 3 B+.

The Idea is, that the air-quality get's constantly measured and i get an email everytime the measurement is interupted or a certan vallue is too high/low...

So far, I'm trying out this tutorial

https://create.arduino.cc/projecthub/wahltharvey/iot-pressure-sensor-mkr-gsm-arduino-cloud-google-sheets-9cdc62?ref=platform&ref_id=424_trending___&offset=7

next step would be to change the google-sheets-script to something that works for me.

I would be gratefull for every recommendation that accelerate my progress in doing so.

Here's a short example of what my data looks like:

[15:04:31.871871 0.000003] SGP30 test
[15:04:31.903972 0.032167] Found SGP30 serial #0F62C5E
[15:04:31.934588 0.030620] TVOC 0 ppb eCO2 400 ppm
[15:04:31.960837 0.026249] Raw H2 13830 Raw Ethanol 18270
[15:04:32.956878 0.996036] TVOC 0 ppb eCO2 400 ppm
[15:04:32.982862 0.025983] Raw H2 13835 Raw Ethanol 18275
[15:04:33.996247 1.013387] TVOC 0 ppb eCO2 400 ppm
[15:04:34.022412 0.026167] Raw H2 13826 Raw Ethanol 18261
[15:04:35.036139 1.013709] TVOC 0 ppb eCO2 400 ppm
[15:04:35.062015 0.025891] Raw H2 13828 Raw Ethanol 18263
[15:04:36.074436 1.012420] TVOC 0 ppb eCO2 400 ppm
[15:04:36.100608 0.026177] Raw H2 13837 Raw Ethanol 18264
[15:04:37.114293 1.013681] TVOC 0 ppb eCO2 400 ppm
[15:04:37.140549 0.026257] Raw H2 13833 Raw Ethanol 18271
[15:04:38.152640 1.012090] TVOC 0 ppb eCO2 400 ppm
[15:04:38.180153 0.027516] Raw H2 13830 Raw Ethanol 18274
[15:04:39.192118 1.011961] TVOC 0 ppb eCO2 400 ppm
[15:04:39.218295 0.026180] Raw H2 13829 Raw Ethanol 18258
[15:04:40.231727 1.013430] TVOC 0 ppb eCO2 400 ppm
[15:04:40.257893 0.026170] Raw H2 13831 Raw Ethanol 18263
[15:04:41.271587 1.013687] TVOC 0 ppb eCO2 400 ppm
[15:04:41.297507 0.025924] Raw H2 13834 Raw Ethanol 18268
[15:04:42.309903 1.012395] TVOC 0 ppb eCO2 400 ppm

Problems:
1: I used "grabserial" for raspberry, to get this. As you can see, the timestamp has no date in it... That would mean, i can only plot 24h and every day the date from yesterday gets overwritten, right?

2: The SGP30 Sensors has 4 Parameters it can measure, like TVOC's (most important), Eco2 and H2 and Ethanol. I never managed to show all the 4 parameters at the same time in one nice diagram... Any idea
what i could do?

3: Gnuplot was a great tool to do a live stream of the data using the commands: "pause -1" and "reread"
I don't know why but after 10thousand measurements the programm just crashes.

Thanks for your attention :slight_smile:

Pictures may follow

When I did a project on the RPI, I 1st, made sure, using Python, my serial routines worked before trying to connect to the Arduino, loopback test. Use level shifters between the Pi and Arduino, except for the Due or ESP32.

I used these as level shifters: which gave me reliable serial speeds at 230400 baud.

I used a pin connection Uno to Pi to signal when data was available, level shifted. I ran the Python code to read the serial using the pin change signal as an interrupt that data was available. If I made the RPi check the serial port too quickly the other things the RPi did suffered a performance hit.