Closed the0ne closed 4 years ago
Does this affect existing code? Can it be merged safely?
Does not affect existing Lua Code. But existing Code with multiple read commands triggers too high number of bytes on the bus so that it should probably be updated anyway ;-)
this fixes #296 where multiple :read() commands lead to additional bytes on the i2c bus
fixed by providing additional length parameter (max 128) to the read function so the user can now specify the number of bytes to read - each byte that has been read is returned as integer value by default
on request also added an optional parameter (boolean) to return the data as a string