Kod:
Kod: Zaznacz cały
#include <SuplaDevice.h>
#include <supla/network/esp_wifi.h>
#include <supla/control/button.h>
#include <supla/sensor/virtual_binary.h>
const char* ssid = "wlan-g";
const char* password = "******";
Supla::ESPWifi wifiInterface;
void setup() {
Serial.begin(11520);
wifiInterface.setSsid(ssid);
wifiInterface.setPassword(password);
char GUID[SUPLA_GUID_SIZE] = {0x2B,0xFF,0xE5,0x76,0x62,0x0A,0x92,0x49,0xA3,0xDC,0x8C,0xB9,0xE3,0x61,0xEB,0x5C};
char AUTHKEY[SUPLA_AUTHKEY_SIZE] = {0xE1,0xAD,0xD1,0x4D,0x2F,0xCC,0xB3,0xD8,0xBD,0x8E,0xC7,0x55,0x95,0xD3,0x74,0x36};
Supla::Sensor::VirtualBinary *sensor = new Supla::Sensor::VirtualBinary;
Supla::Control::Button *buttonSet = new Supla::Control::Button(5, true, true);
Supla::Control::Button *buttonClear = new Supla::Control::Button(6, true, true);
buttonSet->willTrigger(*sensor, Supla::ON_PRESS, Supla::SET);
buttonClear->willTrigger(*sensor, Supla::ON_PRESS, Supla::CLEAR);
SuplaDevice.begin(GUID, // Global Unique Identifier
"*******",// //"svr23.supla.org", // SUPLA server address
"**************",
AUTHKEY); // Authorization key
}
void loop() {
SuplaDevice.iterate();
}
Bardzo proszę o pomoc w rozwiązaniu tej dziwnej jak dla mnie sprawy