Difference between revisions of "HIP:LittleFe Touchscreen Display"
(→Set up the touchscreen to control the mouse) |
(→Install the Kernel Module) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 29: | Line 29: | ||
If you are running version 2.6.22.9_aufs the source tree can be downloaded [http://cluster.earlham.edu/detail/bccd-ng/linux-2.6.22.9_aufs.tar.bz2 here] | If you are running version 2.6.22.9_aufs the source tree can be downloaded [http://cluster.earlham.edu/detail/bccd-ng/linux-2.6.22.9_aufs.tar.bz2 here] | ||
+ | |||
+ | You can download a pre-built kernel module for x86, and the kernel above [http://cs.earlham.edu/~purcebr/tkusb.ko here] | ||
+ | |||
+ | |||
extract the source to /usr/src | extract the source to /usr/src | ||
Line 76: | Line 80: | ||
Installing the driver is great and all, but now the goal is to link the touchscreen input to the mouse. iphone anyone? | Installing the driver is great and all, but now the goal is to link the touchscreen input to the mouse. iphone anyone? | ||
+ | |||
'''Important Note''' | '''Important Note''' | ||
Line 81: | Line 86: | ||
The Touchkit driver is fairly unstable, so it's very easy to bork it entirely. Never unplug the touchscreen while it is an active input | The Touchkit driver is fairly unstable, so it's very easy to bork it entirely. Never unplug the touchscreen while it is an active input | ||
device. The touchscreen is not as reliable as a mouse or a keyboard, and unplugging it when the tkusb.ko module is looking for it can really mess things up. Always shut down the computer before unplugging the touchscreen. | device. The touchscreen is not as reliable as a mouse or a keyboard, and unplugging it when the tkusb.ko module is looking for it can really mess things up. Always shut down the computer before unplugging the touchscreen. | ||
+ | |||
That being said, you should be able to simply load the module, which you did in the last section, plug the touchscreen into an available USB port, and run | That being said, you should be able to simply load the module, which you did in the last section, plug the touchscreen into an available USB port, and run | ||
Line 93: | Line 99: | ||
Then try to load the newly copied module and try the above steps again. | Then try to load the newly copied module and try the above steps again. | ||
+ | |||
+ | == Control Panel Design and Interface == | ||
+ | |||
+ | The goal here is to develop an interface where people can approach and engage the littlefe easily using a touchscreen command system. qt is the platform of choice at this point for developing the graphical frontend and tieing actions, such as button presses and slider value changes to backend scripts that run certain jobs on the littlefe. The interface will most likely feature a few different tabs for different ''modes'' of operation. | ||
+ | |||
+ | The following directions outline the procedure for creating your own interface. | ||
+ | |||
+ | <pre>apt-get install designer-qt3</pre> | ||
+ | |||
+ | qt3 designer makes it easy to create interfaces and tie certain events pertaining to each object activate a script with certain parameters, specified by a slider or radiobuttons/check boxes. | ||
+ | |||
+ | For this specific project, we're only concerned with the more basic aspects of qt: simply designing an interface and linking events to system calls in c++. For a detailed tutorial on getting started with qt designer, see | ||
==OutBack Powersystems MATE== | ==OutBack Powersystems MATE== |
Latest revision as of 10:20, 27 May 2009
Contents
Equipment
7 Inch TFT Touchscreen LCD Monitor
Installation on the BCCD Version 3
Get the tarball and configure the system
This section is describes the steps required to set up the TouchKit Drivers on the Debian-based BCCD platform. The software included with the unit is totally out of date, and there website hosts conflicting drivers, so watch out.
To get the good drivers, go to eGalax TouchKit Drivers Choose your appropriate kernel type. To check to see which kernel version you're using, type
uname -r
Now that the tarball has downloaded, de-tar it. Upon entering the newly unzipped directory, you should see a script named setup.sh
sudo ./setup.sh uninstall
Next install the software
sudo ./setup.sh
This script takes care of the X configuration. It does not install the driver, although it likes to pretend that it does. You will have to do this manually.
Install the Kernel Module
Much of these directions come from eGalax Touchscreen on linuxquestions.org First of all, you're going to need the kernel source for the machine on which you are configuring the touchscreen. This needs to be the exact source tree. Again, you can check the kernel version by typing
uname -r
If you are running version 2.6.22.9_aufs the source tree can be downloaded here
You can download a pre-built kernel module for x86, and the kernel above here
extract the source to /usr/src
To make your life easier, make a sym link linux linking to linux-2.6.* for your version.
ln -s /usr/src/linux-2.6.22.9_aufs /usr/src/linux
enter the /usr/src/directory, and prepare the source to compile a module
make oldconfig make prepare make modules SUBDIRS=scripts/mod
Now enter the USBsrc folder and edit the Makefile, changing
KDIR := /lib/modules/$(shell uname -r)/build
to
KDIR := /usr/src/linux
now run
make all
When make succeeds, you must copy the newly compiled module over to /lib/modules.
Then test to see everything is working. Make sure the touchscreen is not plugged in the USB ports, and load the module
insmod /lib/modules/tkusb.o
Now plug in the touchscreen. When you run
cat /proc/bus/usb/devices
You should see an entry representing the touchscreen. The important field to note is
Driver=Touchkit
If you see this field, then the driver installation went smoothly.
Set up the touchscreen to control the mouse
Installing the driver is great and all, but now the goal is to link the touchscreen input to the mouse. iphone anyone?
Important Note
The Touchkit driver is fairly unstable, so it's very easy to bork it entirely. Never unplug the touchscreen while it is an active input device. The touchscreen is not as reliable as a mouse or a keyboard, and unplugging it when the tkusb.ko module is looking for it can really mess things up. Always shut down the computer before unplugging the touchscreen.
That being said, you should be able to simply load the module, which you did in the last section, plug the touchscreen into an available USB port, and run
$ Touchkit
This will bring up a touchscreen configuration box. If it can't find the device, then you are witnessing the instability of this module first-hand. In this case, you might try to remove the module from memory
rmmod /lib/modules/tkusb.o
recopy the module from the USBsrc build directory again, because something probably got messed up with the tkusb module in memory
Then try to load the newly copied module and try the above steps again.
Control Panel Design and Interface
The goal here is to develop an interface where people can approach and engage the littlefe easily using a touchscreen command system. qt is the platform of choice at this point for developing the graphical frontend and tieing actions, such as button presses and slider value changes to backend scripts that run certain jobs on the littlefe. The interface will most likely feature a few different tabs for different modes of operation.
The following directions outline the procedure for creating your own interface.
apt-get install designer-qt3
qt3 designer makes it easy to create interfaces and tie certain events pertaining to each object activate a script with certain parameters, specified by a slider or radiobuttons/check boxes.
For this specific project, we're only concerned with the more basic aspects of qt: simply designing an interface and linking events to system calls in c++. For a detailed tutorial on getting started with qt designer, see
OutBack Powersystems MATE
- The MATE system installed in the display case on the first floor of Dennis has a serial interface. This project will aim to connect solar power generation data to the infobomb system.
LittleFe
- This data will then be visualized in real time on the littlefe.
- The touch screen monitor will be connected to the little fe.