The default rate of 9,600 bits per second is fine for many cases, but if you are working with a device that needs a higher speed, you can pass a number higher than 9,600 to Serial.begin(). Make sure to set it to whatever value you use with Serial.begin(). You can set the speed at which data is transmitted (the baud rate, measured in bits per second) using the drop-down box on the bottom right. Arduino also includes a Serial Plotter that can graph serial data sent from Arduino (see Recipe 4.1). You can also send data from the Serial Monitor to Arduino by entering text in the text box to the left of the Send button. The Arduino IDE (described in Recipe 1.3) provides a Serial Monitor (shown in Figure 4-1) to display serial data sent from Arduino. You can also use an external LCD display to show these messages, but in all likelihood, you’d use I2C or SPI to communicate with that kind of display (see Chapter 13).
You can send debug messages from Arduino to the computer and display them on your computer screen or send them to another device such as a Raspberry Pi or another Arduino. Serial communications are also a handy tool for debugging. The recipes here show how you can use that same communication link to send and receive any information between Arduino and your computer or another serial device. The upload process sends data from your computer to Arduino, and Arduino sends status messages back to the computer to confirm the transfer is working.
#Coolterm serial port error how to
This chapter explains how to send and receive information using this capability.Ĭhapter 1 described how to connect the Arduino USB serial port to your computer to upload sketches. Serial communications provide an easy and flexible way for your Arduino board to interact with your computer and other devices.