ArduinoProm
ArduinoProm copied to clipboard
False reading from serial with arduino uno and nano like.
Arduino nano or uno (compatible ones) needs a empty reading and delay for working. For example:
def eeprom_read():
ser.flushInput()
ser.flushOutput()
rx_data=bytes()
ser.write(bytearray(b'\x00'))
rx_data = ser.read(256) # this is empty
time.sleep(0.5)
ser.write(bytearray(b'\x00'))
rx_data = ser.read(256) # this has 256 bytes
print(rx_data)
return rx_data
why? i don't know. Just works by the way awesome project you save my life!
Another useful piece of information for those using an Uno: the SDA and SCL pins are different from the ones marked in the README on the Arduino Nano clone. See this pinout guide for the correct pins:
This worked for me. Someone please make a pull request.