Where I describe the different options for using a serial monitor and the serial software in AVR_C.
Serial communications is a great low-cost way to communicate with the Uno. The USB cable which supplies power is also capable of communicating with the microcontroller. Each operating system has a variety of applications capable of providing serial communications.
All Platforms - Arduino IDE Serial Monitor
Arduino IDE Serial Monitor works for communicating with the Uno. As stated before, installing the Arduino IDE is great for debugging any issues between your PC and the Uno.
I recommend using the Serial Monitor initially to test the Uno serial connection. You start the monitor by one of the following options:
- Arduino IDE -> Tools -> Serial Monitor
- Clicking the icon in the upper right corner of the IDE. (See image below)
Once the Serial Monitor is running, it needs to be setup properly. Make sure the correct port is in the upper left-hand corner, the “No line ending” is selected and the baud rate is 9600:
The issue with the Serial Monitor is that it needs to be closed, every time you want to upload code to the Uno. If it isn’t closed, you will have an error such as this one:
make flash avrdude -c Arduino -p atmega328p -F -V -P /dev/cu.usbmodem4201 -b 115200 -U flash:w:main.hex avrdude: ser_open(): can't open device "/dev/cu.usbmodem4201": Resource busy avrdude: opening programmer "Arduino" on port "/dev/cu.usbmodem4201" failed avrdude done. Thank you. make: *** [flash] Error 1
Closing Serial Monitor and re-opening it, every time you wish to upload to the Uno, can become a bit tiresome. To resolve this issue, CoolTerm is a very good serial monitor which has a Connect/Reconnect button to make it easier to use.
CoolTerm Page is available for all three platforms, macOS, Linux and Windows. Here are the Install Instructions by platform:
Steps to install or to watch video:
- CoolTerm - Download Win
- Right-click and “Extract All” to folder in Downloads folder
- Double-click on extracted folder, then again to reach CoolTerm.exe
- Click on CoolTerm.exe and note the Manage Application Tools at the top of the Explorer Window
- Click on Application Tools then Pin to TaskBar (see image)
Steps to Install
- CoolTerm - Download macOS(Intel/ARM)
- Download macOS file then in the Downloads folder, double-click on it
- Double-click on the .dmg file to mount it
- Click on the mounted dmg file in Finder
- Drag CoolTerm to Applications
- Open the Applications folder and right-click on CoolTerm
- Select Open then click on Open, sometimes you have to do this twice…to open CoolTerm
The Cool Term developer admits the application isn’t “official” for Linux, so I would suggest other possible serial applications such as moserial. I have used moserial extensively and found it to work very well.
Installation of either application is best from your typical install method, “sudo apt install moserial” in the command line or via Software Center on Ubuntu or Pamac on ArchLinux(Manjaro).
Configuring Cool Term
Click on Connection -> Options and select the following: Serial Port
- Port: port you have been using for the Uno.
- Baudrate: 9600
- Data Bits: 8
- Parity: None
- Stop Bits: 1 This should be all of the configuration, you will need to do.