Smart Home Automation Forum
[arduino source code for KC868-Uair-9] Send RF 433MHz wireless signal - 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-Uair (https://www.kincony.com/forum/forumdisplay.php?fid=31)
+--- Thread: [arduino source code for KC868-Uair-9] Send RF 433MHz wireless signal (/showthread.php?tid=1592)



[arduino source code for KC868-Uair-9] Send RF 433MHz wireless signal - admin - 01-05-2022

#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableTransmit(digitalPinToInterrupt(2));
}

void loop() {
  mySwitch.switchOn("11111", "00010");
  delay(1000);
  mySwitch.switchOff("11111", "00010");
  delay(1000);

  mySwitch.send(5393, 24);
  delay(1000); 
  mySwitch.send(5396, 24);
  delay(1000); 

  mySwitch.send("000000000001010100010001");
  delay(1000); 
  mySwitch.send("000000000001010100010100");
  delay(1000);

  mySwitch.sendTriState("00000FFF0F0F");
  delay(1000); 
  mySwitch.sendTriState("00000FFF0FF0");
  delay(1000);
}

download arduino IDE source code file: 

.zip   433-sender-code.zip (Size: 407 bytes / Downloads: 272)

Note: install "rcswitch" library online firstly.
[Image: attachment.php?aid=462]