TL;DR: how can I enable serial via usb on the raspberry pi pico using platformio?
Using CLion + platformio plugin on Arch Linux.
I was working on a project with 240 individually addressable LEDs and a rotary encoder; the arduino nano was not fast enough to handle both, as it misses encoder movements/interrupts when FastLED lib is flushing the LED effects.
In an attempt to get a faster mcu, I bought a raspberry pi pico, thinking I could handle the encoder and leds in each of its individual separate cores, but boy, is this board user UN-friendly!!!
There’s a big chapter about me simply trying to figure out how to upload code via platformio since this mcu does not present a serial interface when plugged in, but skipping to my current issue, after the blink example is working.
I see several tutorials explaining how to enable serial over USB which should be as simple as adding a
pico_enable_stdio_usb command to the CMakeLists.txt file, except that with platformio.ini I do not have such file, so I was wondering what other options I have.
Option 1: drop arduino framework and platformio and use the CMakeLists.txt (will need to find an alternative for FastLED and other libs as well as rewrite existing code)
Option 2: drop pi pico and look for another faster (multi-core?) board compatible with arduino and platformio without the pico shenanigans, which should allow me to keep my current development stack.
Option 3: (which is why I am here), find a way to use the arduino framework, FastLED and platformio (since my code is already written using it) and still enable serial over usb without the CMakeLists.txt.
I swear I did try to google a way to do this, but it looks like I am doing something that hasn’t been attempted or at least hasn’t been documented online before. Is it possible to enable the serial interface of the raspberry pi pico in such a way that existing code with Serial.print* will still work as intended?
[env] framework = arduino ;lib_deps = ; fastled/FastLED ; contrem/arduino-timer ; mathertel/OneButton [env:pico] platform = raspberrypi board = pico upload_port = /dev/ttyACM0
Thank you for your time.