mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-05 12:54:57 +00:00
Added comments
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#include <DHT.h>
|
#include <DHT.h>
|
||||||
|
// define pins and type of DHT sensor
|
||||||
#define DHTPIN 4
|
#define DHTPIN 4
|
||||||
#define DHTTYPE DHT11
|
#define DHTTYPE DHT11
|
||||||
#define MQ5_PIN 2
|
#define MQ5_PIN 2
|
||||||
@@ -19,7 +19,7 @@ void loop() {
|
|||||||
float t = dht.readTemperature();
|
float t = dht.readTemperature();
|
||||||
|
|
||||||
int mq5Value = analogRead(MQ5_PIN);
|
int mq5Value = analogRead(MQ5_PIN);
|
||||||
|
// if sensor isn't connected properly display error message
|
||||||
if (isnan(h) || isnan(t)) {
|
if (isnan(h) || isnan(t)) {
|
||||||
Serial.println("Fout bij het lezen van de sensor!");
|
Serial.println("Fout bij het lezen van de sensor!");
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user