Tutorial 3 on Communicating with the Intel® Galileo Boards
Basic communication to Serial Monitor
Let's get a simple Hello World script to run using the command-line interface within Linux*. When programming with the Arduino* software interface, we use the Serial.println() function to output to the serial monitor. Linux uses the "echo" command, which is a built-in function used to display output to a screen.
Step 1: Open serial monitor
While the Arduino program is running, open the serial monitor by clicking the serial monitor icon on the far right of the menu.
Step 2: Telnet into the board
Keep an eye on the serial monitor. After connecting to the board via telnet, run the following command:
echo "hello, world" > dev/ttyGS0
This should print the "hello world" to the serial Monitor:
This same code can be accomplished from within the Arduino IDE. Using the "system" function to execute commands via Linux:
system("echo \"hello, world!\" > /dev/ttyGS0"); //Serial (IDE Serial Monitor)
- Introduction
- Connecting to Linux Through Telnet
- Communication to Galileo
- Galileo Data Visualization
- Wrap up