Hello Rob,
First, thank you for your great contribution! I'd love to use your code to read wind, temp and RH from a OS WTGR800. I built my hardware using a 433Mhz receiver like this one:
https://create.arduino.cc/projecthub/MisterBotBreak/how-to-communicate-using-433mhz-modules-9c20ed
Put the batteries on my WTGR800, and start monitoring the outputs, and while debugging:
while (digitalRead(RxPin) != tempBit) {
1
}
delayMicroseconds(sDelay);
if (digitalRead(RxPin) != tempBit) {
noErrors = false;
2
}
else {
3
byte bitState = tempBit ^ polarity;
delayMicroseconds(lDelay);
if (digitalRead(RxPin) == tempBit) {
tempBit = tempBit ^ 1;
}
if (bitState == 1) {
if (!firstZero) {
headerHits++;
if (headerHits == headerBits) {
//digitalWrite(ledPin,1);
4
}
}
else {
add(bitState);
}
}
else {
if (headerHits < headerBits) {
noErrors = false;
}
else {
if ((!firstZero) && (headerHits >= headerBits)) {
firstZero = true;
//digitalWrite(ledPin,1);
5
}
Serial.println("Al ADD");
add(bitState);
}
}
I get to the points 1,2 and 3, but I'm not able to get to 4 and 5, shall I try changing any of the Variables for Manchester Receiver Logic?
Any help will be very much appreciatted!
Stay safe!