Monday, July 21, 2014

Touchscreen on Raspberry Pi

A friend has a few Elo Touchscreens from a past venture, and I have racked my brain trying to figure out a use for them. After giving up on Android PCs, I took a stab with a Raspberry Pi Model B running the Raspbian image from Noobs.  Two obstacles presented themselves:

  1. The Raspberry Pi only outputs HDMI.  For now, I'm going to try an HDMI to VGA converter. Better to get this thing off the ground than hem and haw about a 'better' solution.
  2. The touchscreen is inverted.  For this, I installed the xinput-calibrator tool per the instructions on the Raspberry Pi forums given by msmithy12 and a helpful config guide:
sudo apt-get install libx11-dev
sudo apt-get install libxext-dev
sudo apt-get install libxi-dev
sudo apt-get install x11proto-input-dev
tar xvzf (downloaded file)
cd (downloaded file)
sudo make install
Then, from the menu: Preferences/Calibrate Touchscreen
  1.  Do not immediately follow the instructions given when you run calibration (place the calibration in a /etc/Xll/...).  Doing so borked my Raspbian install.  Instead, create the file specified in /usr/share/X11/xorg.conf.d/.  I ran "sudo leafpad 99-calibration.conf" to create and edit the file.  After dropping in the calibration indicated, I restarted and found out it stuck.  Woo hoo!
 I will update this space with my progress.  Currently, the setup is:
  • Raspberry Pi Model B ($35)
  • Elo Touchscreen ET1939L (Pre-owned)
  • BYTECC HM-VGA005 HDMI-A to VGA Female Adapter/Converter ($20)
  • 1 x WiFi Dongle (Ralink RT5370 chipset) ($10)

Lessons Learned

  • Single User Mode could have beenused to save my Raspbian install.  It can be entered by adding init=/bin/sh to cmdline.txt.  I was using Noobs, so holding Shift while the PI boots got me into the editor.
  • I like Linux more and more each project.
Post a Comment