So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By MSanRafael
#61320 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..:)
User avatar
By pYr0x
#64944
MSanRafael wrote: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..:)


Hey MSanRafael can you pls give us more information. e.g. how you wired up the connection.
i put me ESP on the board and wrote in my arduino IDE a function like, then i flash the ESP.

Code: Select allvoid turnOnRelay () {
const byte miBufferON[] = {0xA0, 0x01, 0x01, 0xA2};
Serial.write(miBufferON, sizeof(miBufferON));
}

but nothing happend.

i also tried to use the serial monitor on my arduino IDE. i connected my USB 2 Serial to the relay board (RX -> TX and TX -> RX).
i send the command you posted
Code: Select all0xA0, 0x01, 0x01, 0xA2
on Baurate 9600. i received some hieroglyphic back but the relay does not switch.

thx for help
User avatar
By Nigel Willis
#65026 I have the same problem when I use the Arduino IDE serial monitor. Still trying to find out why, I'll let you know when I do. But I can get it to work using LC Technology's own windows based serial coms client. You can download it along with a user guide for the relay module from:

http://www.fluxworkshop.com/Further%20Product%20Files/LBAA100014/LC%205V%20WIFI%20Relay%20Module.zip

Good luck.