OLIMEX© 2017
A20-OLinuXino-LIME2 user's manual
2.7.2 Debian calibration
The command that allows calibrating in Debian Linux is:
ts_calibrate
The default Debian setup is made with settings for HDMI 720p/60Hz. If you want to change some other
LCD, VGA or HDMI resolution then you have to start script file in /root directory.
If the problem is under Debian Linux make sure you are properly logged in the XFCE interface! Else
applying calibration would not happen for the current user – if you are calibrating from the X graphical
interface make sure that you are logged as user “olimex” (if calibrating without the X, the user is “root”).
#su olimex
enter the password: olimex
calibrate the touch screen and reboot the board
#sudo reboot
2.8 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
Page 18 of 51