-
• #2
I'm afraid not. It might make more sense to implement the I2C scanner purely in JavaScript - all you need to do is clock out maybe 10 bits per device?
Just to add, software I2C (
var i2c=new I2C();i2c.setup(...)
) might be faster... -
• #3
Wow - Now it is fast as expected!
SDA = B7; SCL = B6; // Pico i2c = new I2C(); i2c.setup({sda:SDA,scl:SCL});
Now a
i2c.readFrom(0,1)
returns anew Uint8Array([255])
shouldn't this throw an exception?How to decide if this id is attached or not?
-
• #4
This was the change for the ESP8266: "i2c replace jsError() with jsExceptionHere() #868"
-
• #5
Software I2C applies across all boards, including ESP8266 - so you should see the same behaviour there if using software I2C.
It's odd, because there are definitely timeout checks in the I2c implementation
When testing this i2c scanner I figured out that there is a delay of 2sec before next scan.
A full scan over the 120 id will take about 240 seconds.
Is there a option to change this delay/timeout?