Verification error, first mismatch at byte 0x0000

I can think of a couple of possibilities for these errors.

  • You might be using the wrong board setting in platformio.ini. If you are using board=nanoatmega328new then try board=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 the board 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 the platformio.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.