Browse Source

call the atomizer calibration process now and defined the pin where the LDR sensor for calibration is placed

master
Luis Rodil-Fernandez 3 years ago
parent
commit
0388f1bad0
  1. 1
      src/config.h
  2. 6
      src/main.cpp

1
src/config.h

@ -3,6 +3,7 @@
#define PIN_DHT 16
#define PIN_ATOMIZER 4
#define PIN_ATOMIZER_LDR 33
// mqtt://interact:c9FjEDUnRgDTalBR@interact.cloud.shiftr.io
#define MQTT_BROKER "interact.cloud.shiftr.io"

6
src/main.cpp

@ -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...");

Loading…
Cancel
Save