geoffklee / micropython-smbus

A wrapper to provide methods of the CPython 'smbus' module on micropython
MIT License
24 stars 5 forks source link

Make interface to write_i2c_block_data more robust and cleanup some docs #5

Open matteius opened 2 years ago

matteius commented 2 years ago

I got some code that was intended for the Raspberry Pi running on the pico tonight for the BME280 sensor, and I used this library to supply the smbus module that was being requested. The library though was passing in an int in a list to the method write_i2c_block_data which currently doesn't handle that case. I feel this refactor handles a multitude of cases more than the current logic and have opened this PR to suggest the change.

karelv commented 1 day ago

Just to inform that used your update in my PR. I added the 16-bit memory address read/write support. https://github.com/geoffklee/micropython-smbus/pull/6