Last active
May 5, 2019 13:02
-
-
Save doleron/2b4773365d84991d718022226494381d to your computer and use it in GitHub Desktop.
Esp8266 01 cheap WIFI Relay Module from Shenzhen LC Technology Co or just lctech-inc.com. Just a example how to control the relay by sending serial hex codes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
byte close[] = {0xA0, 0x01, 0x01, 0xA2}; | |
Serial.write(close, sizeof(close)); | |
delay(2000); | |
byte open[] = {0xA0, 0x01, 0x00, 0xA1}; | |
Serial.write(open, sizeof(open)); | |
delay(2000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks ! This helped me a lot !