define for config values

This commit is contained in:
Stefan Ostermann 2021-05-14 15:02:11 +02:00
parent 23d4f8d2ec
commit 2623b3c97c
2 changed files with 3 additions and 3 deletions

View File

@ -15,6 +15,6 @@
#define WATCHDOG_SLEEP_FURTHER 8
// define wether to use a DHT-Sensor or not
bool USE_DHT_SENSOR = true;
#define USE_DHT_SENSOR true;
#endif

View File

@ -68,7 +68,7 @@ void setup()
pinMode(SOIL_PIN, INPUT);
// init the DHT22
if (USE_DHT_SENSOR == 1)
if (USE_DHT_SENSOR)
{
dht_init(&dht, DHT_PIN);
}
@ -115,7 +115,7 @@ void loop()
memcpy(&rh_buf[1], &battery, 4);
rh_send(rh_buf,RH_BUF_LEN);
}
else if (USE_DHT_SENSOR == 1)
else if (USE_DHT_SENSOR)
{
if (dht_read_data(&dht, &t, &h) == 1)
{