|
|
@ -14,7 +14,7 @@ |
|
|
|
#include "mqtt.h"
|
|
|
|
|
|
|
|
DHT dht(PIN_DHT, DHT11); |
|
|
|
Atomizer fog(PIN_ATOMIZER); |
|
|
|
Atomizer fog(PIN_ATOMIZER, PIN_ATOMIZER_LDR); |
|
|
|
|
|
|
|
typedef struct dhtReading { |
|
|
|
float humidity, // in %
|
|
|
@ -32,8 +32,6 @@ void setup() { |
|
|
|
Serial.begin(115200); |
|
|
|
LOG_INIT(); |
|
|
|
|
|
|
|
pinMode(PIN_ATOMIZER, OUTPUT); |
|
|
|
|
|
|
|
duty.setFrequency(0.05); |
|
|
|
duty.setAmplitude(0.5); |
|
|
|
duty.setPhase(0); |
|
|
@ -51,6 +49,8 @@ void setup() { |
|
|
|
Serial.println("Brace! Brace! trying to continue without wifi..."); |
|
|
|
} |
|
|
|
|
|
|
|
fog.calibrate(); |
|
|
|
|
|
|
|
mqtt_init(); |
|
|
|
|
|
|
|
Serial.println("Initializing DHT sensor..."); |
|
|
|