• I would advise you to review the Espruino documentation on the I2C.writeTo function:

    Call type:
    function I2C.writeTo(address, data, ...)
    Parameters
    
    address - The 7 bit address of the device to transmit to, or an object of the form {address:12, stop:false} to send this data without a STOP signal.
    
    data, ... - One or more items to write. May be ints, strings, arrays, or special objects (see E.toUint8Array for more info).
    

    and also what the Adafruit writeRegister8 function does, namely pack the two arguments together and send them both to the device.

    void Adafruit_MMA8451::writeRegister8(uint8_t­ reg, uint8_t value) {
      uint8_t buffer[2] = {reg, value};
      i2c_dev->write(buffer, 2);
    }
    

    In short, your existing code appears to read and write from a variety of random device addresses, none of which have any corresponding I2C bus device apart from 29(0x1D).

About

Avatar for user149798 @user149798 started