Skip to content

this is a simple example of how to use the ESP8266 double relay board from aliexpress

Notifications You must be signed in to change notification settings

TheRegularDX/ESPDoubleRelayBlink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

ESPDoubleRelayBlink

this is a simple example of how to use the ESP8266 serial double relay board from aliexpress with arduino firmware.

Important bits

(im disabling the RX pin to use it as a regular GPIO pin for sensors or peripherals, which is sometimes not recommended)

Serial.begin(115200, SERIAL_8N1, SERIAL_TX_ONLY);

Then the relays, these are controlled via Serial.write();

Here is Relay0:

// Relay0 on
Serial.write(0xA0);
Serial.write(0x01);
Serial.write(0x01);
Serial.write(0xA2);
  
// Relay0 off
Serial.write(0xA0);
Serial.write(0x01);
Serial.write(0x00);
Serial.write(0xA1);

Here is Relay1:

// Relay1 on
Serial.write(0xA0);
Serial.write(0x02);
Serial.write(0x01);
Serial.write(0xA3);
  
// Relay1 off
Serial.write(0xA0);
Serial.write(0x02);
Serial.write(0x00);
Serial.write(0xA2);

alt text

About

this is a simple example of how to use the ESP8266 double relay board from aliexpress

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages