I'm using an Arduino MKR WiFi 1010, a SAMD ARM Cortex M3 board. I rely on the standard library a lot, using things like std::vector<>
and std::string
. I also want to use std::cout
. I've managed to do this on an UNO R3 using the ArduinoSTL library, but that library neither works nor is necessary on the MKR WiFi 1010, because it has all the standard library stuff built in to the platform.
However, on MKR WiFi 1010, I cannot get std::cout
to produce any output. I'm guessing its not really hooked up to anything.
I want std::cout
to write to Serial
(which is aliased to SerialUSB
which is of type Serial_
).
Is there a way of making std::cout
write to the Serial
stream?
#define
clause? It might work. Something like this, but in the other way around. It's not really "writing to serial", but it will at least look that way when you read the code.