You are reading a single comment by @luwar and its replies.
Click here to read the full conversation.
-
The default bitrate is actually 50000 (at least on proper Espruino boards)... Which one are you using?
Good to know. I thought the default bitrate were higher. I'm using a classic and different pico boards. So it is unnecessary in my case to check the bitrate if nobody increase it explicitly. Ok, thanks.
i2c._options.bitrate
looks more like an internal API. I would prefer a documented getBitrate() method but that's only my viewpoint.
The default bitrate is actually 50000 (at least on proper Espruino boards)... Which one are you using?
You can check
i2c._options.bitrate
- however if the use didn't initialise I2C or didn't specify a bitrate then it won't be there, so you'd have to do something like:This could be built into Espruino itself as a function - but then you'd have to wait for the next version before your code would work.