Why can the methods of Serial be invoked without first instantiating a Serial object?
For example Serial.begin() can be used as is.
Normally, to use a class method, that class must first be instantiated.
Why can the methods of Serial be invoked without first instantiating a Serial object?
For example Serial.begin() can be used as is.
Normally, to use a class method, that class must first be instantiated.
Why can the methods of Serial be invoked without first instantiating a Serial object?
The serial objects are instantiated in the Arduino core files, for example in https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/cores/arduino/HardwareSerial0.cpp#L67