I'd like to replace the micro controller in my 16 ch 315mhz relay board with an Arduino. The relay board's wireless receiver is a syn470r and I have a 2nd identical receiver to use for experimenting with the Arduino. I briefly tried to use the RadioHead library's ASK example but I don't receive any data from the receiver. I have the VCC, Gnd and Data lines connected to Arduino 5V, Gnd and io 11. Here's my sketch, any help would be appreciated.
#include <RH_ASK.h>
#include <SPI.h> // Not actualy used but needed to compile
//RH_ASK driver;
RH_ASK driver(2000, 11, 12, 10, false);
void setup()
{
Serial.begin(115200); // Debugging only
while(!Serial);
if (!driver.init()){
Serial.println("init failed");
} else {
Serial.println("init complete");
}
}
void loop(){
uint8_t buf[RH_ASK_MAX_MESSAGE_LEN];
uint8_t buflen = sizeof(buf);
if (driver.recv(buf, &buflen)){ // Non-blocking
int i;
driver.printBuffer("Got:", buf, buflen); // Message with a good checksum received, dump it.
}
}
If I press buttons on the 315mhz remote, the only serial output I see is the "init complete" message.