Hardware Reference
In-Depth Information
The last section defines the input device for the touchscreen component of the
Mimo. The touchscreen device uses the
evdev
driver, pointing to the e2i input device
node identified earlier:
/dev/input/by-id/usb-e2i_Technology__Inc._USB_Touchpanel_L000000000-event-
if00
Continuing our less-than-creative naming scheme, it is named
touchscreen
. We need
to have the Mimo touchscreen in
Raw
reporting mode to work properly, and since we
are using it as the main input pointer, we want it to have the
SendCoreEvents
option
enabled.
The last option is a calibration option, which is how the Mimo touchscreen knows how
to properly report touch events. The calibration values should be correct for your
device, but if they are not, you may need to determine them for yourself. There are a
few ways to do this, but the tool that exists for most of the Linux distributions is called
evtest
. To install it on Pidora, run:
$ su -c 'yum install evtest -y'
Or on Raspbian/Occidentalis:
$ sudo apt-get install evtest
evtest
is intended as a debugging tool, to see all of the input that is being generated
from an evdev-compatible input device. For calibration purposes, we need to know
the minimum and maximum values being reported along the X and Y axes of the
touchscreen. Run
evtest
on the Mimo touchscreen device node:
$ sudo evtest /dev/input/by-id/usb-
e2i_Technology__Inc._USB_Touchpanel_L000000000-event-if00
Using the Touchscreen
Now, every time you touch the screen,
evtest
will output debugging information about
the event. For example, when you touch near the center of the screen, it generates an
event that looks like this:
Event: time 1378951053.759441, type 1 (EV_KEY), code 330 (BTN_TOUCH), value
1
Event: time 1378951053.759452, type 3 (EV_ABS), code 0 (ABS_X), value 17165
Event: time 1378951053.759456, type 3 (EV_ABS), code 1 (ABS_Y), value 17217
Event: time 1378951053.759460, -------------- SYN_REPORT ------------
Event: time 1378951053.766434, type 3 (EV_ABS), code 0 (ABS_X), value 17191
Event: time 1378951053.766442, type 3 (EV_ABS), code 1 (ABS_Y), value 17259
Event: time 1378951053.766446, -------------- SYN_REPORT ------------
Event: time 1378951053.773442, type 3 (EV_ABS), code 0 (ABS_X), value 17208
Event: time 1378951053.773452, type 3 (EV_ABS), code 1 (ABS_Y), value 17422