Print 'Hello World!' text to the Serial when serial port is connected.
Arduino IDE
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB
}
Serial.println("Hello World!");
}
void loop() {
// proceed normally
}
setup() function is execute once.
Open the Serial Monitor to see the result.
Hello World!
#cout #echo #helloworld #printf #println