Playing with Arduino
A page to record my playing with Arduino
HardwareSerial::operator bool()

Abstract

The HardwareSerial::operator bool() checks if the serial port is available or not.

Source Code

The HardwareSerial::operator bool() is defined in hardware/arduino/avr/cores/arduino/HardwareSerial.h as below.

1
operator bool() { return true; }

It always return true.

Version

Arduino 1.8.13

Last Update

June 19, 2020

inserted by FC2 system