Hello World!

From SainSmart Wiki
Revision as of 07:00, 14 June 2013 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In this chapter, we will learn use Arduino IDE serial interface tools to show the contents that we want to display in the computer.

Example code:

void setup()
   Serial.begin(9600);// opens serial port, sets data rate to 9600 bps
 Serial.println("Hello World!");
void loop()


Serial.begin(9600); The comment says 9600 bps, and just so you know bps stands for bits-per-second (we will refer to this as the baud rate). Communicate with computer, you may choose these rate “300, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 115200”.


1) Download code to arduino.

2) After download, click “tool”, pick up relevant arduino board, and relevant com. Then click “serial Monitor”, on the new open up window’s bottom right, choose the relevant rate.