5#define WIFI_SSID "YOUR_SSID"
6#define WIFI_PASS "YOUR_PASS"
24 digitalWrite(26, LOW);
25 M5.begin(
true,
false,
true);
28 M5.dis.drawpix(0, 0x00f000);
31 while (WiFi.status() != WL_CONNECTED) {
32 Serial.println(
"wait...");
37 M5.dis.drawpix(0, 0x0000f0);
40 echo.
details[0x9D] =
new byte[3] {0x02, 0x01, 0x80};
41 echo.
details[0x9E] =
new byte[4] {0x03, 0x02, 0x80, 0xa0};
42 echo.
details[0x9f] =
new byte[12]{0x0b, 0x0a, 0x80, 0x81, 0x82, 0x83, 0x88, 0x8a, 0x9d, 0x9e, 0x9f, 0xa0};
48 0x10, 0x81, 0x00, 0x00, 0x0e, 0xf0, 0x01, 0x0e, 0xf0, 0x01,
EL_INF, 0x01, 0xd5, 0x04, 0x01, 0x01, 0x33, 0x01
62 if (M5.Btn.wasPressed())
79 Serial.println(
"EL_SETI");
87 pdcedt =
new byte[2]{0x01, 0x30};
93 pdcedt =
new byte[2]{0x01, 0x31};
123 Serial.println(
"EL_GET/EL_INF_REQ");
129 Serial.println(
"EL_INF");
157 M5.dis.drawpix(0, 0x0000f0);
173 M5.dis.drawpix(0, 0xf00000);
183 digitalWrite(26, HIGH);
185 digitalWrite(26, LOW);
192 Serial.println(
"-----------------------------------");
196 IPAddress ip = WiFi.localIP();
197 Serial.print(
"IP Address: ");
200 IPAddress dgwip = WiFi.gatewayIP();
201 Serial.print(
"DGW Address: ");
202 Serial.println(dgwip);
204 IPAddress smip = WiFi.subnetMask();
205 Serial.print(
"SM Address: ");
206 Serial.println(smip);
208 Serial.println(
"-----------------------------------");
ECHONET Lite protocol for Arduino
void update(const byte epc, byte pdcedt[])
void sendMulti(byte sBuffer[], int size)
byte _rBuffer[EL_BUFFER_SIZE]
receive buffer
ELOBJ details
device object (for simple eoj)
void changeMode(int mode)
EL echo(elUDP, 0x01, 0x33, 0x01)