LAN DS18B20 WEB Temperature Monitor 1 meter Cable
www.WEB-Relays.com
www.Facebook.com/KMtronic

ESP8266 NodeMCU: KMtronic UART 8 Channel Relay Controller control

Spread the love

KMtronic UART 8 Channel Relay Controller control

 

KMtronic UART Relay Controller Eight Channel
KMtronic UART Relay Controller Eight Channel

 

ESP8266 NodeMCU: KMtronic UART 8 Channel Relay Controller control
ESP8266 NodeMCU: KMtronic UART 8 Channel Relay Controller control

 

 

void setup() {
 //Initialize serial and wait for port to open:
 Serial.begin(9600);

}


void loop() {

for(uint8_t i=1; i < 9; i++ ){
 KMtronic_Relay_ON(i);
 delay(50);
 }

for(uint8_t i=1; i < 9; i++ ){
 KMtronic_Relay_OFF(i);
 delay(50);
 }


 KMtronic_Relay_ON(1);
 delay(500);

KMtronic_Relay_OFF(1);
 delay(500);

KMtronic_Relay_ON(8);
 delay(500);

KMtronic_Relay_OFF(8);
 delay(500);
 
}

void KMtronic_Relay_ON(uint8_t number)
{
 Serial.write((uint8_t)0xFF);
 Serial.write((uint8_t)number);
 Serial.write((uint8_t)0x01);
}

void KMtronic_Relay_OFF(uint8_t number)
{
 Serial.write((uint8_t)0xFF);
 Serial.write((uint8_t)number);
 Serial.write((uint8_t)0x00);
}

 

 

 

KMtronic LAN WEB 8 Channel Relay board