Letux Kernel


You are looking at an old revision of the page Sensors. This revision was created by Nikolaus Schaller.

Table of Content

How to access the Sensors

3-Axis Accelerometer

cat /sys/bus/i2c/drivers/tsc2007/2-0041/coord

Data range: 1g is approx. equivalent to a readout of 4096. The maximum is 4g, i.e. 16383. If the device is rotated by 180 degrees, the values become negative.

The axis orientation is:

  • x:
  • y:
  • z:

3-Axis Gyroscope

cat /sys/bus/i2c/devices/i2c-2/2-0068/values

3-Axis Compass


Barometer and Thermometer

cat /sys/bus/i2c/devices/i2c-2/2-0077/pressure
cat /sys/bus/i2c/devices/i2c-2/2-0077/temperature

Touch Screen Position, Pressure/Resistance, Temperature and (optional) Ambient light intensity

The raw ADC values, plate resistance, the temperature sensors and the AUX input (optional ambient light sensor) can be read through

cat /sys/bus/i2c/drivers/tsc2007/2-0048/values

The order of the values is

x, y, pressure, pendown(0/1), z1, z2, temp0, temp1, aux, resistance

The temp and aux values are updated every 100ms and the other values only on pen-down every 1ms.

Pressure values are an estimate and are lower for touches with small area (fingernail, stylus) and higher for bigger touch area (finger tip or multitouch). Typical range:

  • 300 for stylus
  • 700 for finger tip
  • 2000-15000 for two fingers

Resistance is an estimate with a reference value of 600 Ohms.

Note: the x and y values are the raw values before any calibration (which is usually done through libts or similar means).