Dodawał ktos może czujniki SHT30/SHT31 w IDE na ESP32 tak żeby były widoczne w SuplaCloud?
Mam 2 z adresem 0x44 i 0x45 i chciabym nimi mierzyć temperaturę i wilgotnosć
Program napisany w Arduino IDE 1.8.57
Płytka ESP32 v1
Biblioteka SuplaDevice 2.4.0 ( wyższa biblioteka się nie kompilowała)
Jak dotąd, jestem w stanie dodac czujnik DS18B20 i przekaźnik
Kod: Zaznacz cały
#include <SuplaDevice.h> // v2.4.0
// Add include to DS sensor
#include <supla/sensor/DS18B20.h>
#include <supla/network/esp_wifi.h>
Supla::ESPWifi wifi("xxxx", "xxxx");
#include <supla/control/relay.h>
void setup() {
Serial.begin(115200);
// Replace the falowing GUID with value that you can retrieve from https://www.supla.org/arduino/get-guid
char GUID[SUPLA_GUID_SIZE] = {xxxxxxxxxx};
// Replace the following AUTHKEY with value that you can retrieve from: https://www.supla.org/arduino/get-authkey
char AUTHKEY[SUPLA_AUTHKEY_SIZE] = {xxxxxxxxxx};
DeviceAddress sensor1 = {0x28, 0xEB, 0x3B, 0x96, 0xF0, 0x01, 0x3C, 0x87};
new Supla::Sensor::DS18B20(32, sensor1);
Supla::Control::Relay *relayCh0 = new Supla::Control::Relay(5, false);
SuplaDevice.begin(GUID, // Global Unique Identifier
"svr1.supla.org", // SUPLA server address
"@@@@@@gmail.com", // Email address used to login to Supla Cloud
AUTHKEY); // Authorization key
}
void loop() {
SuplaDevice.iterate();
}