diff options
author | Alphara <42233094+xAlpharax@users.noreply.github.com> | 2023-11-04 21:34:22 +0000 |
---|---|---|
committer | Alphara <42233094+xAlpharax@users.noreply.github.com> | 2023-11-04 21:34:22 +0000 |
commit | a26b7c2cff9ca416917872a976fbcce6202fb938 (patch) | |
tree | a7e1eade1b0238fa75520a3a128cd88b9f507816 /learning_examples | |
parent | 097c457e47a7a61ce50267dd7204089702ed68c5 (diff) |
Unified code and workflow + logic.
All that s needed now is Wifi integration with the outputs.
DSM is weird... will look again later.
Diffstat (limited to 'learning_examples')
-rw-r--r-- | learning_examples/DHT_Tester_esp32/DHT_Tester_esp32.ino (renamed from learning_examples/DHT_Tester_esp32/DHTtester_esp32.ino) | 0 | ||||
-rw-r--r-- | learning_examples/DSM501A-example-esp32-ehh-unreliable-CRAP/DSM501A-example-esp32-ehh-unreliable-CRAP.ino (renamed from learning_examples/DSM501A-example-ehh-unreliable/DSM501A-example-ehh.ino) | 13 | ||||
-rw-r--r-- | learning_examples/MQ135_workaround_analog_esp32/MQ135_workaround_analog_esp32.ino (renamed from learning_examples/MQ135_workaround_analog_esp32/parts_per_mil_mq135_workaround_analog_esp32.ino) | 0 |
3 files changed, 6 insertions, 7 deletions
diff --git a/learning_examples/DHT_Tester_esp32/DHTtester_esp32.ino b/learning_examples/DHT_Tester_esp32/DHT_Tester_esp32.ino index f12bfb5..f12bfb5 100644 --- a/learning_examples/DHT_Tester_esp32/DHTtester_esp32.ino +++ b/learning_examples/DHT_Tester_esp32/DHT_Tester_esp32.ino diff --git a/learning_examples/DSM501A-example-ehh-unreliable/DSM501A-example-ehh.ino b/learning_examples/DSM501A-example-esp32-ehh-unreliable-CRAP/DSM501A-example-esp32-ehh-unreliable-CRAP.ino index 7852763..b29a512 100644 --- a/learning_examples/DSM501A-example-ehh-unreliable/DSM501A-example-ehh.ino +++ b/learning_examples/DSM501A-example-esp32-ehh-unreliable-CRAP/DSM501A-example-esp32-ehh-unreliable-CRAP.ino @@ -45,19 +45,18 @@ void loop() endtime = millis(); if ((endtime-starttime) > sampletime_ms) //Only after 30s has passed we calcualte the ratio { - /* - ratio1 = (lowpulseoccupancy/1000000.0)/30.0*100.0; //Calculate the ratio - Serial.print("ratio1: "); - Serial.println(ratio1); + // ratio1 = (lowpulseoccupancy/1000000.0)/30.0*100.0; //Calculate the ratio + // Serial.print("ratio1: "); + // Serial.println(ratio1); - concentration = 0.001915 * pow(ratio1,2) + 0.09522 * ratio1 - 0.04884;//Calculate the mg/m3 - */ + // concentration = 0.001915 * pow(ratio1,2) + 0.09522 * ratio1 - 0.04884;//Calculate the mg/m3 + float conPM1 = calculateConcentration(lowpulseoccupancyPM1,30); float conPM25 = calculateConcentration(lowpulseoccupancyPM25,30); Serial.print("PM1 "); Serial.print(conPM1); Serial.print(" PM25 "); - Serial.println(conPM25); + Serial.println(conPM25); // this is pretty negative:) lowpulseoccupancyPM1 = 0; lowpulseoccupancyPM25 = 0; starttime = millis(); diff --git a/learning_examples/MQ135_workaround_analog_esp32/parts_per_mil_mq135_workaround_analog_esp32.ino b/learning_examples/MQ135_workaround_analog_esp32/MQ135_workaround_analog_esp32.ino index dc2ed08..dc2ed08 100644 --- a/learning_examples/MQ135_workaround_analog_esp32/parts_per_mil_mq135_workaround_analog_esp32.ino +++ b/learning_examples/MQ135_workaround_analog_esp32/MQ135_workaround_analog_esp32.ino |