How to directly manupilate UART of pcDuino under Linux

In Arduino-ish programming, we can use Serial.print to access the UART of pcDuino. Many users are asking, how to directly manipulate the UART of pcDuino. In this post, we detail the steps needed to access UART under Linux.

First, we need to check if gpio driver is loaded:

$ls -l /sys/devices/virtual/misc/gpio/mode/gpio0

If gpio driver is not loaded, we can run the following command to load gpio driver:

$sudo modprobe gpio

If we are not using Arduino-ish programming, we need to do the following before using UART: