Hi everyone, I developed a software application that sends serial data to an Arduino board to control an LED. I have two boards: an original Arduino Mega 2560 and a third-party Robotdyn Mega 2560 which uses the CH340 USB-to-serial chip.
I used avrdude to upload the required sketch to both boards. After uploading, both boards work as expected — my software can control the LED.
However, after unplugging and reconnecting the boards, only the original board continues to work with the software immediately. The Robotdyn board stops responding to serial commands until I re-upload the sketch again using avrdude.
This issue only happens with the CH340-based board.
I'm trying to understand why the sketch doesn’t persist or initialize properly after re-connection on the Robotdyn board, and how to reliably make it work without requiring a re-flash every time.