• Sounds like a really good idea...

    I'd suggest a (maybe optional) RTS/CTS implementation (it could always be removed by shorting the 2 wires together). It'd allow someone to use the setDeepSleep mode of Espruino, with a small bit of wrapper code:

    setWatch(function(e) {
      digitalWrite(CTS, e.state);
      setDeepSleep(!e.state);
    }, RTS, {repeat:true, edge:"both});
    

    Just some ideas:

    • Maybe go for AT commands? That seems pretty standard for serial
    • Ciseco had their LLAP protocol. It's a similar idea, and might be worth a quick read just to see if they had any ideas
    • As in LLAP, it might be worth making sure $(data) is actually just hex characters - it'll make it a lot safer (for instance how would you send \r otherwise).

    Finally, I know this goes against your plan a bit, but I whether anything could be done in Espruino to make it better at decoding RF... Maybe I could add the ability to drop any state changes that happened too quickly, before they even got to JS.

About

Avatar for Gordon @Gordon started