Building Arduino Projects for the Internet of Things

(Steven Felgate) #1

CHAPTER 1 ■ ARDUINO BASICS


Finally, click on the Upload button and open the Serial Monitor window. Make sure
the value selected in the Serial Monitor dropdown is the same as the value set in the
Serial.begin() function. In this case, it is 9600 in the code, so 9600 baud needs to be
selected in the Serial Monitor dropdown. Otherwise, you will not be able to see the log
messages.
As shown in Figure  1-9 , you will start seeing log messages in the Serial Monitor
window at an interval of 5,000 milliseconds.


Figure 1-9. Log messages from the code in the Serial Monitor window


You will also need to select what port to use for code upload. As shown in Figure  1-8
from Tools ➤ Port, select the USB port that connects Arduino to your computer.


Figure 1-8. Select the Arduino port

Free download pdf