There is this i2c memory operations...
http://docs.micropython.org/en/latest/p ... adfrom_mem
I2C.readfrom_mem_into(addr, memaddr, buf, *, addrsize=8)
after the buf, there is this parameter with *
what goes there ???
and if addrsize = 8 then by inserting a value in the parameter change the size of length of the data read ??
also is there anyway i can read from memory and know if read has been successful..
like return a 1 if successful or 0 if not ??
because i got try: ..... except in mind but what if buf is empty after readinto buf has been performed
any examples ??
Regards
I2C read and write
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: I2C read and write
The * signifies that subsequent arguments must be supplied as keyword args. See https://stackoverflow.com/questions/222 ... -parameter.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.