User manual
Ausgabe 07.12.2016 Copyright by Joy-IT 18
3
RPi - Explorer700
11. UART sample programs - Transming the serial data received
Noces: The serial port of RPi is set to terminal debugging mode by default. However, in order to run
this sample program, you should disable the terminal debugging funcon, which means you cannot
debug the RPi via the serial port communicaon any more. In this case, you should employ other
methods to debug the RPi before running this program. For example, you can connect an external
HDMI displayer to the RPi or use SSH.
wiringPi program:
Enter the Linux terminal, and run the following commands:
The command for compiling the program:
The command for execung the program:
Expected result: Connect the expansion board to the PC via the USB TO UART interface, and congure
the serial communicaon soware on the PC (Here, you can use the soware PuTTY to monitor the
serial port), selecng the right serial port number and seng the Baud rate to 115200. Then, you can
use your PC to send data to the RPi via the serial communicaon. Aer the data is received by the RPi,
it will be echoed to the serial monitor on the PC.
python program:
Enter the Linux terminal, and run the following commands to execute the program:
Expected result: It is the same as in the above case.
pi@raspberrypi ~/Explorer700/UART/wiringPi $ sudo ./
pi@raspberrypi ~/Explorer700/UART/wiringPi $ make
pi@raspberrypi ~/Explorer700/UART/python $ sudo python uart.py