Smart Home Automation Forum
[Arduino source code for KC868-ASR]-02 Relay ON AND OFF - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20)
+--- Forum: KC868-ASR (https://www.kincony.com/forum/forumdisplay.php?fid=42)
+--- Thread: [Arduino source code for KC868-ASR]-02 Relay ON AND OFF (/showthread.php?tid=2633)



[Arduino source code for KC868-ASR]-02 Relay ON AND OFF - KinCony Support - 03-02-2023

Code:
#define OUT0 19
#define OUT1 5
void setup() {
  Serial.begin(115200);

  pinMode(OUT0,OUTPUT);
  pinMode(OUT1,OUTPUT);   
}

void loop() {
      digitalWrite(OUT0, HIGH);
      delay(200);
      digitalWrite(OUT1, HIGH);
      delay(200); 
      digitalWrite(OUT0,LOW);
      delay(200);
      digitalWrite(OUT1, LOW);
      delay(200);
}