You are reading a single comment by @DrAzzy and its replies. Click here to read the full conversation.
  • 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.

About

Avatar for DrAzzy @DrAzzy started