Hi,
Since many years I'm using a Lacrosse WS2300 weather station, receiving data through 433Mhz receiver connected to an Arduino nano.
Now, I'm trying to do the same with a Davis VP2.
I'm using an Arduino (uno and/or nano), with an
Adafruit transceiver. RFM69HCW chipset only, not entire Feather board.
I've tried several libraries, from
dekay to
mcrossley, including
kobuki and
hydrosense ones.
Everytime with same difficulties.
First, I have to add a manual
reset in initialization setup :
void setup() {
(...)
pinMode(RFM69_RST, OUTPUT);
digitalWrite(RFM69_RST, LOW);
(...)
// manual reset
digitalWrite(RFM69_RST, HIGH);
delay(10);
digitalWrite(RFM69_RST, LOW);
delay(10);
radio.initialize();
(...)
}
Then, I have to adjust DavisRFM69.cpp isr0 code, based on LowPowerLab code, doing something like this...
From :
void DavisRFM69::isr0() { selfPointer->interruptHandler(); }
(...)
bool DavisRFM69::receiveDone() {
return _packetReceived;
}
To :
void DavisRFM69::isr0() { _haveData = true; }
(...)
bool DavisRFM69::receiveDone() {
//ATOMIC_BLOCK(ATOMIC_FORCEON)
//{
if (_haveData) {
_haveData = false;
interruptHandler();
return _packetReceived;
}
/*if (_mode == RF69_MODE_RX && PAYLOADLEN > 0)
{
setMode(RF69_MODE_STANDBY); // enables interrupts
return true;
}
else*/ if (_mode == RF69_MODE_RX) // already in RX no payload yet
{
return false;
}
receiveBegin();
return false;
//}
}
Without that, I have strange behaviors : hangs, restarts, weired data.
Now everything is working : I'm receiving about 98% good packets.
Like
mcrossley, I have this sequence (every 2.5 sec) :
8 E 5 4
8 E 5 9
8 E 5 C
8 E 5 A
8 E 5 6
In next post, I will describe my problems managing received data.