Hello all,
I'm having a bit of an issue getting an arduino and a Pi to talk to each other through the rfm69hcw radio.
both are wired correctly and otherwise work fine, and it's got to the point where im not even sure its possible to do. Ive done a fair bit of research and drawn a blank. If it is possible, its most likely an issue with my code.
does anyone know:
a)Whether this is possible,
b)How one would go about it?
many thanks in advance.
#include <SPI.h>
#include <RH_RF69.h>
#define RF69_FREQ 433.0
#define RFM69_INT 3
#define RFM69_CS 4
#define RFM69_RST 2
#define LED 13
RH_RF69 rf69(RFM69_CS, RFM69_INT);
void setup()
{
Serial.begin(9600);
pinMode(LED, OUTPUT);
pinMode(RFM69_RST, OUTPUT);
digitalWrite(RFM69_RST, LOW);
Serial.println("Feather RFM69 RX Test!");
Serial.println();
digitalWrite(RFM69_RST, HIGH);
delay(10);
digitalWrite(RFM69_RST, LOW);
delay(10);
if (!rf69.init()) {
Serial.println("RFM69 radio init failed");
while (1);
}
Serial.println("RFM69 radio init OK!");
if (!rf69.setFrequency(RF69_FREQ)) {
Serial.println("setFrequency failed");
}
pinMode(LED, OUTPUT);
}
void loop() {
delay(1);
if (rf69.available()) {
Serial.print("Recieved something");
} else {
Serial.println("Receive failed");
}
}