• Your understanding of the waveforms is correct.

    I used save() : when I'm done debugging, I (again) download the code from the IDE and immediately issue a 'save()'. I assume that puts the Espruino JavaScript engine in a 'virgin' state without too much debug history left behind.

    I agree with your comment that there may not be much time gained implementing an I2C event (except for large data chunks such as displays). I find it always a challenge to take into account the lower speed of a small CPU compared to the desktop beasts we use to develop our hardware/firmware :).

    A combined 'writeTo - readFrom' might be an easier cycle-saver : an I2C read transaction almost always starts with write-register-address - but that's only something to add to the whish-list...

       i2c.writeTo(i2c_address, register_address);
       var data = i2c.readFrom(i2c_address, count);
    // whish :
      var data = i2c.readFromAddress(i2c_address, register_address, count);
    
About

Avatar for jgw @jgw started