simplify the I2C API
orangecms opened this issue · 2 comments
orangecms commented
-
Currently, we need to pass the I2C address for every API call to the I2C bus. It would be great to have a simpler API where you could instead initialize a class with the address and keep using the object for further operations.
-
When reading a single byte, we need to take it from an array for each read. A simpler
read_single
would be great, or mayberead_16
etc in addition for two bytes at once.
nkpro2000sr commented
i would like to work on this ✋
orangecms commented
i would like to work on this ✋
Nice, thank you! Please file a PR. :)
For some inspiration, you can compare with MicroPython's API.