arduino 315Mhz问题
初学者,我现在用pt2264做发射端,315Mhz超再生作接受端单片机解码,现在读出遥控器的数据,接下来怎样操作来控制单片机数字引脚 #include <RCSwitch.h>RCSwitch mySwitch = RCSwitch();
unsigned long ID;
void setup() {
Serial.begin(9600);
mySwitch.enableReceive(0);//设置中断0,数字2脚为接收端
mySwitch.enableTransmit(10);//设置数字10脚为发射端
}
void loop() {
if (mySwitch.available()) {
ID=mySwitch.getReceivedValue();
Serial.println(ID);
mySwitch.resetAvailable();
}
下面直接判断 ID=“”
8018727 发表于 2015-5-14 13:54 static/image/common/back.gif
#include
RCSwitch mySwitch = RCSwitch();
感谢,有点门路了:P
页:
[1]