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