Hi,
Ich hab da nen Problem mit dem RFM69HCW und der RadioHead Bibliothek.
Ich habe das Funkmodul richtig verbunden und alles Andere überprüft, an der Hardware liegt es nicht.
Das Modul läuft über SPI an einem Arduino Mega Pro.
Pinbelegung wie folgt:
Slave-/ChipSelect Pin ist 4
Interrupt bzw G0 ist 3
RST ist 2
MOSI 51
MISO 50
SCK 52
Es ist das Modul von Adafruit für 5V und hat bereits erfolgreich funktioniert.
Der Fehler sieht wie folgt aus:
Der rf69.init(); Befehl stoppt sowohl im Beispiel als auch im eigenen Code das Programm, es hängt sich total auf.
Es liegt an keinem Anderen Punkt, vor und hinter diesem Befehl sind Serial.println();'s.
Ich habe keinen Plan oder Ansatzt, woran es liegen könnte, also falls Jemand irgendeine Idee hat...
Der Code:
#include <SPI.h>
#include <RH_RF69.h>
RH_RF69 rf69(4,3);
void setup()
{
pinMode(8, OUTPUT);
Serial.begin(9600);
Serial.println("HELLO");
rf69.init();
Serial.println("Init successfully");
if (!rf69.setFrequency(868.0))
Serial.println("setFrequency failed");
// If you are using a high power RF69 eg RFM69HW, you *must* set a Tx power with the
// ishighpowermodule flag set like this:
//rf69.setTxPower(14, true);
// The encryption key has to be the same as the one in the server
uint8_t key[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
rf69.setEncryptionKey(key);
digitalWrite(8, HIGH);
}
"HELLO" wird noch gedruckt