ESP8266 ESP-01 5V 4-Channels WiFi Relay Module

Ya’akov

Joined Jan 27, 2019
9,069
The board has its own MCU. The ESP-01 is only there for serial over WiFi emulation. When you connect to the ESP-01, you send commands over the serial connection to the on-board MCU, the ESP-01 has no connection to the relays at all.

The commands are:

RELAYONOFF
1​
A0 01 01 A2
A0 01 00 A1
2​
A0 02 01 A3
A0 02 00 A2
3​
A0 03 01 A4
A0 03 00 A3
4​
A0 04 01 A5
A0 04 00 A4
 

BobTPH

Joined Jun 5, 2013
8,812
Why do you assert that the ESP01 has only two gpio pins when the diagram you posted shows 4?

The ES8266 on that board could be programmed to control one relay with each of those pins, though I doubt that it actually is since there are ither chips on the motherboard.
 

Thread Starter

Dadu@

Joined Feb 4, 2022
155
Okay I understood pins

I am using Arduino IDE to program ESP01. I am looking some sample code to control 4 relays on this board. I didn't find sample code.
 

Ya’akov

Joined Jan 27, 2019
9,069
Okay I understood pins

I am using Arduino IDE to program ESP01. I am looking some sample code to control 4 relays on this board. I didn't find sample code.
I don't have any example code to offer, but did you miss my post, above?

The board has its own MCU. The ESP-01 is only there for serial over WiFi emulation. When you connect to the ESP-01, you send commands over the serial connection to the on-board MCU, the ESP-01 has no connection to the relays at all.

The commands are:
RELAYONOFF
1A0 01 01 A2A0 01 00 A1
2A0 02 01 A3A0 02 00 A2
3A0 03 01 A4A0 03 00 A3
4A0 04 01 A5A0 04 00 A4
 
Top