fossasia/pslab-python

simplify the I2C API

orangecms opened this issue · 2 comments

  • 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 maybe read_16 etc in addition for two bytes at once.

i would like to work on this ✋

i would like to work on this ✋

Nice, thank you! Please file a PR. :)
For some inspiration, you can compare with MicroPython's API.