Re: Trouble with ESP-01 + 1Ch 5V relay from LC Technology
Posted: Sat Jan 21, 2017 4:15 pm
I spent too much time to learn how to enable and disable the relay on "1ch 5V board" from LC Technology using the ESP8266-1 WIFI core.
This board does not use GPIO0 or GPIO2 in order to activate the relay, it use the serial communication instead it.
First: you need to open Serial port communication at 9600B, any other speed does not works fine.
Ex. : Serial.begin(9600);
Second:
To enable the Relay send it by serial port:
const byte miBufferON[] = {0xA0, 0x01, 0x01, 0xA2};
Serial.write(miBufferON, sizeof(miBufferON));
To disable the Relay send it by serial port:
const byte miBufferOFF[] = {0xA0, 0x01, 0x00, 0xA1};
Serial.write(miBufferON, sizeof(miBufferOFF));
I hope this information will be usefully to everybody..
This board does not use GPIO0 or GPIO2 in order to activate the relay, it use the serial communication instead it.
First: you need to open Serial port communication at 9600B, any other speed does not works fine.
Ex. : Serial.begin(9600);
Second:
To enable the Relay send it by serial port:
const byte miBufferON[] = {0xA0, 0x01, 0x01, 0xA2};
Serial.write(miBufferON, sizeof(miBufferON));
To disable the Relay send it by serial port:
const byte miBufferOFF[] = {0xA0, 0x01, 0x00, 0xA1};
Serial.write(miBufferON, sizeof(miBufferOFF));
I hope this information will be usefully to everybody..