Using Serial I/O in cpp

I’m not sure why, but the << operator seems to be missing in Print class (one of the base classes of USBSerial), so you might need to use the clumsy way of calling functions (write()/print()).

Normally you shouldn’t need to include anything other than Particle.h (unless instructed in the docs or non-Particle stuff).
You can always download the open source firmware repo to see what’s there and how it’s done.


Update:
I’ve filed an enhancment issue for this on GitHub

2 Likes