Adafruit Metro Express (samd21): Arduino IDE vs PlatformIO

Hi all,
I’ve used the Arduino IDE for a few (miserable) years and moved to PlatformIO before the newer Arduino IDE was released because I needed a better IDE. Have to say I’m loving the PlatformIO/VSCode combo!

Currently, I was using an Arduino UNO and ran out of ram, so I switched up to an Adafruit Metro Express, a SAMD21 board. In the Arduino IDE with a SAMD21, you have to use SerialUSB.print() to print anything to serial like the typical debug prints. Switching this project over to PlatformIO, I found that to print data to the serial, you use normal (UNO) Serial.print() function.

Just wondering why that is? The project is still using the arduino framework, so I don’t understand why the difference.

Thanks,
Randy

Per https://api.registry.platformio.org/v3/packages/platformio/tool/framework-arduino-samd-adafruit PlatformIO uses Adafruit SAMD core version 1.7.5, which is now 2 minor versions behind (Releases · adafruit/ArduinoCore-samd · GitHub).

What version of the Adafruit SAMD boards does your Arduino IDE board manager show?

Thanks for the reply!

And actually, I should correct myself here… when I said:

I meant to say, ‘Switching the project over to a SAMD21 in PlatformIO’

The project started in PlatformIO with an UNO. When the code got to the point it was using 65% of the UNO’s memory, I switched to the SAMD21.

The first time I used a SAMD21 board, I bought a cheap china clone. I programmed it in the Arduino IDE by installing ‘Arduino SAMD Boards 32-bits ARM Cortex-M0+’ board from Arduino, v1.8.12. That board was typical china junk and lasted about 3 months. I replaced it with the Adafruit Metro Express, but never updated the Arduino IDE to the new board, I just kept programming it as a Arduino SAMD Board.

Anyway, I was just curious,

Randy