Browse Source

enable OTA and MQTT

split_files
Hendrik Langer 6 years ago
parent
commit
6cfc8683f2
  1. 10
      src/main.cpp

10
src/main.cpp

@ -18,12 +18,17 @@
#include <Adafruit_Sensor.h>
#include "Adafruit_BME680.h"
#include "XD0OTA.h"
#include "XD0MQTT.h"
static const char* TAG = "MAIN";
WiFiMulti wifiMulti;
GxEPD2_BW<GxEPD2_213_B72, GxEPD2_213_B72::HEIGHT> display(GxEPD2_213_B72(/*CS=TFT_CS*/ SS, /*DC=*/ TFT_DC, /*RST=*/ TFT_RST, /*BUSY=*/ -1)); // GDEH0213B72
Adafruit_BME680 bme; // I2C (also available: hardware SPI
XD0MQTT mqtt;
void helloWorld()
{
const char HelloWorld[] = "Hello World!";
@ -80,6 +85,11 @@ void setup()
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
XD0OTA ota("esp32-weatherstation");
ota.update();
mqtt.begin();
}
void loop()

Loading…
Cancel
Save