Skip to main content
added 4 characters in body
Source Link
gre_gor
  • 1.7k
  • 4
  • 18
  • 30

The AVR Arduinos (Uno, Nano, Mega) have auto-reset function. At opening of USB connection the circuit around USB resets the MCU. After reset the bootloader waits a second for a new upload. If the upload doesn't happen the bootloader starts the current sketch.

The serial.Serial() command in python opens the USB connection. With that the Arduino is reset and waits in bootloader while you send the data. The data don't arive idoesn't arrive in your sketch. Add a two seconds wait time after python'sPython's serial.Serial().

The AVR Arduinos (Uno, Nano, Mega) have auto-reset function. At opening of USB connection the circuit around USB resets the MCU. After reset the bootloader waits a second for a new upload. If the upload doesn't happen the bootloader starts the current sketch.

The serial.Serial() command in python opens the USB connection. With that the Arduino is reset and waits in bootloader while you send the data. The data don't arive i your sketch. Add a two seconds wait time after python's serial.Serial().

The AVR Arduinos (Uno, Nano, Mega) have auto-reset function. At opening of USB connection the circuit around USB resets the MCU. After reset the bootloader waits a second for a new upload. If the upload doesn't happen the bootloader starts the current sketch.

The serial.Serial() command in python opens the USB connection. With that the Arduino is reset and waits in bootloader while you send the data. The data doesn't arrive in your sketch. Add a two seconds wait time after Python's serial.Serial().

Source Link
Juraj
  • 18.3k
  • 4
  • 32
  • 50

The AVR Arduinos (Uno, Nano, Mega) have auto-reset function. At opening of USB connection the circuit around USB resets the MCU. After reset the bootloader waits a second for a new upload. If the upload doesn't happen the bootloader starts the current sketch.

The serial.Serial() command in python opens the USB connection. With that the Arduino is reset and waits in bootloader while you send the data. The data don't arive i your sketch. Add a two seconds wait time after python's serial.Serial().