ArduinoProm icon indicating copy to clipboard operation
ArduinoProm copied to clipboard

False reading from serial with arduino uno and nano like.

Open eolandro opened this issue 4 years ago • 2 comments

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!

eolandro avatar May 27 '20 04:05 eolandro

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: image

Brycey92 avatar May 25 '22 02:05 Brycey92

This worked for me. Someone please make a pull request.

641i130 avatar Jul 13 '22 23:07 641i130