Examplefordifferent sending methods https://github.com/sui77/rc-switch/ */#include <RCSwitch.h>RCSwitch mySwitch = RCSwitch(); void setup() { Serial.begin(9600);//Transmitter is connected to Arduino Pin#10mySwitch.enableTransmit(10);//Optional set pulse length.//mySwitch.setPulseLength(3...
Simple example for sending http://code.google.com/p/rc-switch/ */ #include<RCSwitch.h> RCSwitchmySwitch=RCSwitch(); void setup() { mySwitch.enableTransmit(2); // Using Pin #2 } void loop() { mySwitch.send("1100101"); // Send the message 0x65, in ASCII, ‘a’ delay(1000);...
示例一:Example for receiving */ #include <RCSwitch.h> RCSwitch mySwitch = RCSwitch(); void setup() { Serial.begin(9600); mySwitch.enableReceive(0); // 接收器中断 0 => 即 pin #2 } void loop() { if (mySwitch.available()) { output(mySwitch.getReceivedValue(), mySwitch.getReceiv...
示例一:Example for receiving */ #include <RCSwitch.h> RCSwitch mySwitch = RCSwitch(); void setup() { Serial.begin(9600); mySwitch.enableReceive(0); // 接收器中断 0 => 即 pin #2 } void loop() { if (mySwitch.available()) { output(mySwitch.getReceivedValue(), mySwitch.getReceiv...
示例一:Example for receiving */ #include <RCSwitch.h> RCSwitch mySwitch = RCSwitch(); voidsetup() { Serial.begin(9600); mySwitch.enableReceive(0);// 接收器中断 0 => 即 pin #2 } voidloop() { if(mySwitch.available()) {
</*Simple example for sendinghttp://code.google.com/p/rc-switch/*/#include<RCSwitch.h>RCSwitch mySwitch=RCSwitch();voidsetup() { mySwitch.enableTransmit(2);//Using Pin #2}voidloop() { mySwitch.send("1100101");//Send the message 0x65, in ASCII, ‘a’delay(1000);//1 second del...
Simple example for sending http:///p/rc-switch/ */ #include <RCSwitch.h> RCSwitch mySwitch = RCSwitch(); void setup() { mySwitch.enableTransmit(2); // Using Pin #2 } void loop() { mySwitch.send("1100101"); // Send the message 0x65, in ASCII, ‘a’ ...
https://github.com/sui77/rc-switch/wiki Info Send RC codes Use your Arduino or Raspberry Pi to operate remote radio controlled devices. This will most likely work with all popular low cost power outlet sockets. If yours doesn't work, you might need to adjust the pulse length. ...
(results.value); switch(results.value){ case 0xFF18E7: //前,对应2 Run(); break; case 0xFF4AB5: //后,对应8 back(); break; case 0xFF10EF: //左,对应4 left(); break; case 0xFF5AA5: //右,对应6 right(); break; case 0xFF38C7: //停止,对应5 Break(); break; default: ...
https://github.com/sui77/rc-switch/wiki Info Send RC codes Use your Arduino or Raspberry Pi to operate remote radio controlled devices. This will most likely work with all popular low cost power outlet sockets. If yours doesn't work, you might need to adjust the pulse length. ...