• @Frida now I found some time to test this nice modifications

    step one build a version with your modification and run some simple tests

    I2C1.setup({sda:D4, scl:D5, bitrate:100000});
    =undefined
    
    >I2C1._options
    ={ "sda": D4, "scl": D5, "bitrate": 100000 }
    > 
    

    read data from eeprom

    >I2C1.readFrom(0x62,9);
    =new Uint8Array([48, 50, 48, 49, 48, 48, 48, 50, 50])
    >I2C1.readFrom(0x62,9);
    =new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255, 255])
    

    hmm ?

    >I2C1.readFrom(0x62,9);
    =new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255, 255])
    >I2C1.writeTo(0x62,1);
    =undefined
    >I2C1.readFrom(0x62,9);
    =new Uint8Array([48, 50, 48, 49, 48, 48, 48, 50, 50])
    > 
    

    can not read twice, have to send dumy writeTo to read again ?!

    i2cget -y 2 0x62 0 has no problems ......

    any comments or hints ?

About

Avatar for MaBe @MaBe started