Why does the "<<" operator not work on Serial?

void setup() {
  Serial.begin(115200);
  Serial << "hello";
}

Why does this not work? Serial is a stream, no?

This is microcontroller C++. There are a few notable differences; this is one.
I think there's a stream extension for Arduino somewhere.

1 Like

The Streaming library does the trick.

1 Like

Try to install the Streaming library and use it as
#include <Streaming.h>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.