updated screen + added OTA
This commit is contained in:
36
main.cpp
36
main.cpp
@@ -41,6 +41,7 @@
|
||||
#include "CO2_sensor.h"
|
||||
#include "VOC_sensor.h"
|
||||
#include "button.h"
|
||||
#include "esp_ota.h"
|
||||
|
||||
/*--------------------------- Program ---------------------------------------*/
|
||||
/**
|
||||
@@ -52,17 +53,33 @@ void setup()
|
||||
Serial.println();
|
||||
Serial.print("Air Quality Sensor starting up, v");
|
||||
Serial.println(VERSION);
|
||||
|
||||
digitalWrite(5, false);
|
||||
|
||||
initWifi();
|
||||
initMQTT();
|
||||
initSensor();
|
||||
initParticles();
|
||||
initCO2sensor();
|
||||
initVOCsensor();
|
||||
ProgressbarVisible(true);
|
||||
initLCD();
|
||||
setOTAProgress(10);
|
||||
|
||||
initButtons();
|
||||
setOTAProgress(20);
|
||||
initWifi();
|
||||
setOTAProgress(30);
|
||||
|
||||
initEspOta();
|
||||
setOTAProgress(40);
|
||||
|
||||
initMQTT();
|
||||
setOTAProgress(50);
|
||||
|
||||
initSensor();
|
||||
setOTAProgress(60);
|
||||
|
||||
initParticles();
|
||||
setOTAProgress(70);
|
||||
|
||||
initCO2sensor();
|
||||
setOTAProgress(80);
|
||||
|
||||
initVOCsensor();
|
||||
setOTAProgress(90);
|
||||
ProgressbarVisible(false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -77,4 +94,5 @@ void loop()
|
||||
handleSensor();
|
||||
handleLCD();
|
||||
handleMQTT();
|
||||
handleEspOta();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user