OLIMEX© 2018
A20-OLinuXino-MICRO user's manual
If there is no “Calibrate Touchscreen” tool, then you are using older official Linux image and you
should execute “ts_calibrate” command, logged as user “olimex” (“su olimex”). The password is
also “olimex”.
The touchscreen calibration under Debian is detailed in the following wiki article:
https://www.olimex.com/wiki/Touch_calibration_official_images
2.9 GPIO under Debian
You can read data from a given GPIO port. The logical ranges are usually as follows:
0V-1V for LOW (or 0)
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
Page 17 of 56