|
@ -21,6 +21,8 @@ |
|
|
#include <Adafruit_Sensor.h> |
|
|
#include <Adafruit_Sensor.h> |
|
|
#include "Adafruit_BME280.h" |
|
|
#include "Adafruit_BME280.h" |
|
|
|
|
|
|
|
|
|
|
|
#include "Adafruit_VEML6075.h" |
|
|
|
|
|
|
|
|
#define ARDUINO_SAMD_VARIANT_COMPLIANCE |
|
|
#define ARDUINO_SAMD_VARIANT_COMPLIANCE |
|
|
#include "SdsDustSensor.h" |
|
|
#include "SdsDustSensor.h" |
|
|
|
|
|
|
|
@ -36,6 +38,7 @@ GxEPD2_BW<GxEPD2_213_B72, GxEPD2_213_B72::HEIGHT> display(GxEPD2_213_B72(/*CS=SS |
|
|
Adafruit_BME280 bme; // I2C (also available: hardware SPI
|
|
|
Adafruit_BME280 bme; // I2C (also available: hardware SPI
|
|
|
//HardwareSerial Serial2(2);
|
|
|
//HardwareSerial Serial2(2);
|
|
|
SdsDustSensor sds(Serial2); |
|
|
SdsDustSensor sds(Serial2); |
|
|
|
|
|
Adafruit_VEML6075 uv = Adafruit_VEML6075(); |
|
|
|
|
|
|
|
|
XD0OTA ota("esp32-weatherstation"); |
|
|
XD0OTA ota("esp32-weatherstation"); |
|
|
XD0MQTT mqtt; |
|
|
XD0MQTT mqtt; |
|
@ -148,6 +151,10 @@ void setup() |
|
|
bme.setGasHeater(320, 150); // 320*C for 150 ms
|
|
|
bme.setGasHeater(320, 150); // 320*C for 150 ms
|
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
if (! uv.begin()) { |
|
|
|
|
|
Serial.println("Failed to communicate with VEML6075 sensor, check wiring?"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
sds.begin(); |
|
|
sds.begin(); |
|
|
|
|
|
|
|
|
display.clearScreen(); |
|
|
display.clearScreen(); |
|
@ -279,6 +286,10 @@ void loop() |
|
|
|
|
|
|
|
|
printValues(); |
|
|
printValues(); |
|
|
|
|
|
|
|
|
|
|
|
Serial.print("UV Index reading: "); Serial.println(uv.readUVI()); |
|
|
|
|
|
Serial.print("Raw UVA reading: "); Serial.println(uv.readUVA()); |
|
|
|
|
|
Serial.print("Raw UVB reading: "); Serial.println(uv.readUVB()); |
|
|
|
|
|
|
|
|
if(wifiMulti.run() != WL_CONNECTED) { |
|
|
if(wifiMulti.run() != WL_CONNECTED) { |
|
|
Serial.println("WiFi not connected!"); |
|
|
Serial.println("WiFi not connected!"); |
|
|
delay(1000); |
|
|
delay(1000); |
|
|