• Sorry for the delay - I was away last week.

    Yes, sadly the JS execution is just a tad too slow for setWatch. It might work with a keyboard where you only get a few bytes at a time, but something like a touchpad where you get a stream of data would probably be too fast.

    While USART isn't in 1v79, it is in the latest GitHub builds and will be in 1v80 (I can't release it yet because there's a bug when calling save() twice in a row). You could try out one of the GitHub builds though, which would work.

    I've tested with PS2, and it's as simple as:

    Serial1.setup(9600,{rx:B7, tx:B6, ck:A8, parity:"odd"});
    Serial1.on('data', function(d) {
      for (var i=0;i<d.length;i++) handlePS2(d.charCodeAt(i));
    });
    
About

Avatar for Gordon @Gordon started