I’m completely new to PlatformIO and just try uploading the classic Blink example to my Arduino nano board. The project seems to compile just fine, but cant upload. This code works without any issue in the ArduinoIDE but not under PlatformIO. I’m new and the options are overwhelming, so can you help me out with this?
(I tried to use all the possible nano options in the board selector without any success. Also - and thats just a guess - I thought that when I select a board the platformio.ini file will change but it doesnt. Not sure if this is a problem)
This is it. After changing the platformio.ini it works fine. The question rises though that how should I be able to figure this out on my own? I mean where can I get the knowledge? What if next time I’d like to upload the code an uno? How should I change the .ini file?
Unless the seller provides the information, you cannot distinguish between the Arduino Nano with the older and the newer bootloader. It’s just a software difference. So nanoatmega328 vs. nanoatmega328new is trial and error. Fortunately, it’s the only board with this problem (at least as far as I know).
If you have an additional board like the Arduino Uno, go to Quick Access / Boards and search for it, i.e. search for uno.
The underlying reason is that the baud rate of the bootloader of older Arduino Nano boards uses 57600 baud while they changed it in never versions to 115200 baud. In older Arduino IDE versions, you only had “ATMega328P” as the chip option for the Arduino Nano which is 57600 baud, but in newer ones they give you “ATMega328P” (now 115200 baud) and “ATMega328P (old bootloader)” (57600 baud). So if you used a recent Arduino IDE version you would have noticed the same error too and would have maybe found this baud rate mismatch issue. But yeah, asking here on the PIO forum gave you a quick answer, too