Smart Home Automation Forum
[Arduino source code for KC868-AM]-04 RELAY - 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-AM (https://www.kincony.com/forum/forumdisplay.php?fid=45)
+--- Thread: [Arduino source code for KC868-AM]-04 RELAY (/showthread.php?tid=2714)



[Arduino source code for KC868-AM]-04 RELAY - KinCony Support - 03-22-2023

Code:
/*KC868-AM  relay  output*/
#define RELAY 15
void setup() {
  pinMode(RELAY, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
    digitalWrite(RELAY, HIGH);
    delay(1000);
    digitalWrite(RELAY, LOW);
    delay(1000);
}