OLIMEX A13-OLinuXino User Manual page 14

Olimex open-source single-board android 4.0 mini-computer
Hide thumbs Also See for A13-OLinuXino:
Table of Contents

Advertisement

OLIMEX© 2014
A13-OLinuXino user's manual
2.4V-3.3V for HIGH (or 1)
All voltages are measured against ground (GND).
If the input signal is to high, you will at least destroy the port!
The algorithms for writing a value to a GPIO port and reading such a value are pretty similar. The
usage of GPIO ports follows the algorithm (we would use GPIO #49 for demonstration purposes):
1. Export GPIO 49:
echo 49 > /sys/class/gpio/export
Note that you can export GPIOs in range with:
for i in `seq 1 1 230`; do echo $i > /sys/class/gpio/export; done
2. Set input/output GPIO 49
2.1 Set input:
echo "in" > /sys/class/gpio/gpio49_ph9/direction
2.2 Set output:
echo "out" > /sys/class/gpio/gpio49_ph9/direction
3. Set value or read value GPIO 49
3.1 Set value:
echo 0 > /sys/class/gpio/gpio49_ph9/value
echo 1 > /sys/class/gpio/gpio49_ph9/value
3.2 Read input:
cat /sys/class/gpio/gpio49_ph9/value
4. Unexport GPIO 49 when finished
echo 49 > /sys/class/gpio/unexport
Page 14 of 37

Advertisement

Table of Contents
loading

This manual is also suitable for:

A13-olinuxino-wifi

Table of Contents