我试图让TI-TI 1101433 MHz收发器模块与我的NodeMCU ESP8266工作,但我不确定的布线。
链接到数据表:链接
这里是与图片的链接:链接
我现在只想用这个收发器作为接收器,所以这是我的设置:
我用另一个433 MHz接收单元测试了下面的代码,它成功了。这是RC链接库的示例代码:
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600);
mySwitch.enableReceive(2); // Receiver on interrupt 0 => that is pin #2
}
void loop() {
if (mySwitch.available()) {
int value = mySwitch.getReceivedValue();
if (value == 0) {
Serial.print("Unknown encoding");
} else {
Serial.print("Received ");
Serial.print( mySwitch.getReceivedValue() );
Serial.print(" / ");
Serial.print( mySwitch.getReceivedBitlength() );
Serial.print("bit ");
Serial.print("Protocol: ");
Serial.println( mySwitch.getReceivedProtocol() );
}
mySwitch.resetAvailable();
}
}当我尝试用上面描述的方式连接新模块时,我什么也得不到。
发布于 2018-07-23 08:27:24
你好,rc交换机库不支持正式的cc1101模块。但是有一个外部驱动程序库,它允许在rcswitch中使用cc1101模块。目前不支持esp模块。esp的更新正在计划中。https://github.com/LSatan/RCSwitch-CC1101-Driver-Lib
https://stackoverflow.com/questions/50952962
复制相似问题