OK, so found my cold solder and fixed it. Nothing got through but I reset the “frames counter” on Console and it started working. What is it?
@descartes my loop-function’s meaningful part is:
if (Door1StateChanged == 1 || Door2StateChanged == 1) {
Serial.print("Door1Pin:");
Serial.println(digitalRead(Door1Pin));
Serial.print("Door2Pin:");
Serial.println(digitalRead(Door2Pin));
TX_INTERVAL = 0; // Change detected, push change faster
Serial.println("Transmiting now");
os_setTimedCallback(&sendjob, os_getTime()+sec2osticks(TX_INTERVAL), do_send);
Door1StateChanged = 0;
Door2StateChanged = 0;
}
…and that seems to work. Only to lead to problems decoding. I watched the video and racked my brain. This coding is something I’m completely new to. Before I move to the advice from @cslorabox , I will try to make sense of this:
My decoder:
function Decoder(bytes, port) {
var door1 = (bytes[0]);
var door2 = (bytes[1]);
return {
Door1: door1,
Door2: door2
}
}
Debug: Door1Pin:1 Door2Pin:0
Data: 31302C2030
Output:
{
“Door1”: 49,
“Door2”: 48
}
What’s wrong with my decoder?