• The idea is to implement a simple register based bytecode interpreter on the ATMEGA chip, and then make an Espruino wrapper for calling into that interpreter over Serial or I2C. I'll also make a client driver for 'Arduino' / Wiring and one for C++ (using the CLI so I can use from C# as well).

    The main goal is to enable the Espruino to have the ability to interact with the Arduino using a simple and known API like arduino.digitalWrite(13, HIGH). Because it's backed by a register based bytecode interpreter I could potentially make a plugin for Espruino where it parses JS and makes it bytecode before passing over. Natyurally the common stuff like digitalWrite will be prewriten to emit the correct bytecode, but with the translator one could imagine things like

    arduino.exec({
        digitalWrite(8, LOW);
        shiftOut(11, 12, LSBFIRST, 16); //make 74hc595 go 0b00010000   
        digitalWrite(8, HIGH);
    });
    

    It's just an idea. Probably yet another pointless academic endeavor but I don't know... What do you think? Worth spending time on?
    In certain situations it's nice to have an off-board device that can deal with high time-sensitive things and as such offload the Espruino and let it sleep more.

About