yup, i'm getting FIFO_FULL errors even with logging off.
Current test code:
var n="";
var t;
var b;
var d;
var wr;
var wf;
var rxing=0;
var lt;
function sigOff(e) {
d=e.time-lt;
lt=e.time;
if (e.state) {
if (d>0.0017 && d<0.0022) {
rxing=1;
}
} else if (rxing) {
if (d>0.0004 && d<0.0013){
n+=(d>0.0008)?1:0;
}else{
n="";
rxing=0;
}
if (n.length==32) {
console.log(n);
console.log("We made it!");
}
}
}
function startListen() {
//wr=setWatch(sigOn,C6,{repeat:true,edge:"rising"});
wf=setWatch(sigOff,C6,{repeat:true,edge:"both"});
console.log("Listening started");
}
Basically, it seems that the noise comes in faster than the Espruino can process it, so it's bogged down before a signal even gets transmitted. I think the reason it's getting as many false starts as it is, is that it's missing intervening noise, and this gap is mistaken for the pause at the start of the transmission. Even the training burst could be contributing...
It works if it's connected to the sender with a wire, which confirms that the noise is likely the problem.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
yup, i'm getting FIFO_FULL errors even with logging off.
Current test code:
Basically, it seems that the noise comes in faster than the Espruino can process it, so it's bogged down before a signal even gets transmitted. I think the reason it's getting as many false starts as it is, is that it's missing intervening noise, and this gap is mistaken for the pause at the start of the transmission. Even the training burst could be contributing...
It works if it's connected to the sender with a wire, which confirms that the noise is likely the problem.