PlatformIO Community

Teensy: Use Serial Monitor when USB Type: "MIDI"

Is it possible to use Serial Monitor with USB Type: “MIDI” with PlatformIO CLI (IDE respectively)? The problem is that in the standard Arduino IDE, when you choose USB Type: “MIDI” there are no more COM1…2 etc, it’s just MIDI, but the Serial Monitor does work correctly. In PlatformIO I have only COM1 available which seems irrelevant port for MIDI configuration, thus no messages are displayed in the console.

BTW, I wasn’t able to find any documentation about serialports command, this page is broken for some reason: http://docs.platformio.org/en/stable/userguide/cmd_serialports.html

Thanks.

It seems for me that I heard this question maybe 1 year ago. Teensyduino has virtual implementation of Serial Port in MIDI mode. I’m not sure that it will from the box :frowning: Need to wait maybe someone will implement it.

Thanks, I fixed this link

I was left with the impression that everything that is possible with Arduino/Teensyduino/etc. is theoretically possible with PlatformIO. Are you saying that you depend on someone else’s implementation? Sorry didn’t understand your answer. No worries though, I can workaround it by toggling the “native” Serial Monitor if someone’s interested and faced the same problem.

Thanks once again.

You are right, PlatformIO is a crazy powerful ecosystem. You can extend it in any ways. If something doesn’t work here, it means that it’s not implemented (but not that it is impossible) :slight_smile:

Arduino IDE doesn’t support this “MIDI trick”. This a Teensyduino hack. Each time when new Arduino IDE is out, Paul from Teensy apply own Java patches. See https://github.com/PaulStoffregen/Arduino-1.6.9-Teensyduino/commit/7881f4e1c42c28a3719555b9edfcdf02ab8a337e#diff-9c8d862ced019e57796c76d3992776ddR1166

BaseNoGui.getBoardPreferences().get(“fake_serial”)

:smile:

I’ll pray for this to be implemented :relieved: there’s nothing left I could possibly want from PlatformIO.

https://github.com/platformio/platform-teensy/issues/6

Hi,

are there some news about that?
I’m facing exactly the same problem and I need the Serial Monitor to “debug” by stuff … I want to print some values into the serial monitor for some MIDI events, therefore I can’t switch the build flags :frowning:

Cheers
Tino

1 Like

Hi Tino,

please did you find any solution? I’ve been reading this and other forums, but not able to find any solution :smiley:

Thnaks, Michal

Can you please post a full example of you setup serial messages via MIDI in the Arduino IDE? Screenshot of Arduino IDE configuration, board type and full code please.

After looking at https://github.com/platformio/platform-teensy/issues/6#issuecomment-419946531 one might be able to use the teensy_serialmon program in VSCode directly (very easy) or integrate the PlatformIO core with it, either by re-implementing the logic found in that serial monitor in Python or by calling into that executable. But for that I need to have a reproducable setup that works in the Arduino IDE (and the right board – I only have a Teensy 4.0 now)