I can think of a couple of possibilities for these errors.
- You might be using the wrong
board
setting inplatformio.ini
. If you are usingboard=nanoatmega328new
then tryboard=nanoatmega328
and vice versa. - You might have a corrupted bootloader. If so, you will need a ICSP device such as USBtinyISP. The command
pio run -t bootloader
will burn the default bootloader assuming, of course, that theboard
setting is correct. When you tried burning the bootloader, you didn’t try it with just a USB data cable did you? (Yes. I know, stupid question!) You need an ICSP for bootloader and EEPROM uploads. - You have an
upload_port
set in theplatformio.ini
file, which is no longer correct for your device and anything else plugged in. Try removing it and letting PlatformIO search for the correct port. I have never had to specify a port, yet!
Failing this, please post the content of your platformio.ini
file. Thanks.
Cheers,
Norm.