• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoJavaHow to directly manupilate UART of pcDuino under L ...
Previous Next

How to directly manupilate UART of pcDuino under Linux

Posted by: admin , January 11, 2014

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:

Configure GPIO0/GPIO1 to be UART mode:

$echo “3” > /sys/devices/virtual/misc/gpio/mode/gpio0
$echo “3” > /sys/devices/virtual/misc/gpio/mode/gpio1
Then we can use regular command to access /dev/ttyS1.

Tags: Java, Linux Applications, Python, UART

Share!
Tweet

admin

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors