/* Program 4-6: Write "Hello world..." to the Serial1 port of Mega * * Connect a 5V USB-TTL converter from the Mega to * the PC. Pin 19(PD3) of the Mega is TxD1 and should be connected * to the Rx of the USB-TTL converter. * * Use a terminal emulator such as Tera Term or Putty to see * the output. See http://www.microdigitaled.com/tutorials/Tera_Terminal.pdf */ void setup() { /* initialize serial1 and set the Baud rate to 9600 */ Serial1.begin(9600); } void loop() { /* write "Hello world" to the Serial1 port */ Serial1.print("Hello world... "); /* pause for a second then repeat */ delay(1000); }