You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In various functions in grovepi.py, there are what seem to me to be completely extraneous calls to read_byte, which can just be deleted. Or at least, deleting them doesn't seem to break anything for me.
e.g. in analogRead it says bus.read_byte(address), then it does the actual read transaction with number = bus.read_i2c_block_data(address, 1). As far as I can tell the bus.read_byte is totally ignored, just does an extra i2c transaction for no reason and makes the code slightly slower.
Maybe I'm missing something and there is a reason for it, but as far as I can tell this is a bug?
The text was updated successfully, but these errors were encountered:
When we were building the firmware initially, we found that read_block() didn't work properly without calling the read_byte() first and this was the way we were able to make it work. It was a workaround then and we seem to have kept it till now.
In various functions in grovepi.py, there are what seem to me to be completely extraneous calls to read_byte, which can just be deleted. Or at least, deleting them doesn't seem to break anything for me.
e.g. in analogRead it says
bus.read_byte(address)
, then it does the actual read transaction withnumber = bus.read_i2c_block_data(address, 1)
. As far as I can tell the bus.read_byte is totally ignored, just does an extra i2c transaction for no reason and makes the code slightly slower.Maybe I'm missing something and there is a reason for it, but as far as I can tell this is a bug?
The text was updated successfully, but these errors were encountered: