ToastFreeware
/
toast
/
airingbutler.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8668609
)
Output time before measurements.
author
gregor herrmann
<gregor@toastfreeware.priv.at>
Thu, 22 Oct 2020 18:49:09 +0000
(20:49 +0200)
committer
gregor herrmann
<gregor@toastfreeware.priv.at>
Thu, 22 Oct 2020 18:49:09 +0000
(20:49 +0200)
millis() aka time since program start.
And raise delay to a second.
airingbutler.ino
patch
|
blob
|
history
diff --git
a/airingbutler.ino
b/airingbutler.ino
index 8ea9d41099e7a2f1686a015c835fb75311aee62c..b8ba6f578cf875a8090929edbf87c59d5915e3b1 100644
(file)
--- a/
airingbutler.ino
+++ b/
airingbutler.ino
@@
-6,24
+6,28
@@
const int tx_pin = 3; // connect to RX on MHZ19
MHZ19 mhz19 = MHZ19(rx_pin,tx_pin);
+unsigned long time;
void setup()
{
Serial.begin(115200);
- Serial.println("
CO2,t
emp");
+ Serial.println("
Time,CO2,T
emp");
mhz19.begin(rx_pin, tx_pin);
}
void loop()
{
+ time = millis();
measurement_t m = mhz19.getMeasurement();
+ Serial.print(time);
+ Serial.print(",");
Serial.print(m.co2_ppm);
Serial.print(",");
Serial.println(m.temperature);
- delay(
5
00);
+ delay(
10
00);
}