Grove - UART Serial
This project will send and receive any data from your board to your PC, in a human readable form, using a serial UART cable. You will use what you learn in this project often!
- If you haven't done so, install a Serial Terminal Program on your PC. This is explained under Getting Started. This example uses the same USB cable you use for debugging, connected to the OpenSDA port, for serial communication.
- Begin a new Grove project using the Grove Project Import method at the bottom of this page.
- In the Project Explorer on the left, under Sources, double click to open the file "arduinoApp.cpp".
- Copy and paste the following code into this file to replace it's contents:
//--------- UART Test #include "arduinoApp.h" void setup() void loop() if(Serial1.available()>0){ |
- The above code will send a string out the COM port to the terminal and wait for you to type a reply. When you hit the enter key it will display what you typed.
- Select Project from the main menu and choose Build Project.
- If there are any errors they will be displayed in the Problems tab.
Now follow the steps under Debugging your ARM Board Project.