Saturday, October 09, 2021 - 3M donated two 3M MicroTouch M170 17 inch touch screen monitors to IQa 20 years ago. Coupling this touch screen to a Raspberry Pi only seems natural. Getting the drivers to work and calibrate is another daunting task.
Start this task with a fresh install of Raspbian Buster copied to a MicroSD driver that will plug into as a hard disk for the Raspberry Pi.
This was done on a Mac OS:
> dd if=/Volumes/OSs/ISOs/raspbian/2021-05-07-raspios-buster-armhf-full.img of=/dev/disk6 bs=10mwhere disk6 is the confirmed MicroSD drive.
Plug the MicroSD drive into the Raspberry and allow it to boot, and expand, and such. Raspbian should auto-detect the proper resolution and refresh rate of the M170. Setup up the timezone, keyboard, language, pi password, and wifi access point. Then open a terminal window and follow:
> sudo apt-get install -y xserver-xorg-input-evdev xinput-calibrator > sudo mv /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf > sudo nano /usr/share/X11/xorg.conf.d/45-evdev.conf #the last Section should have the "touchscreen" in the "Identifier", where under that Section you'll want to add the 4 Option Lines as follows: Section "InputClass" Identifier "evdev touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Driver "evdev" Option "Mode" "Absolute" Option "InvertX" "false" Option "InvertY" "false" Option "SwapAxes" "true" EndSection >> Ctrl-X, Save? >> Y, Enter > sudo reboot now
which will reboot the system and configure the touch screen with the touch cursor movements in the appropriate parallel movements on the screen. Now it only needs calibration.
Click on the Home Raspberry in the top left, and under Preferences and Calibrate Touchscreen run that with a stylus so that there is some accuracy. When complete, the program will open a bash window with its settings and you'll want only the 4 coordinates which you'll add to the 45-evdev.conf as shown below:
> sudo nano /usr/share/X11/xorg.conf.d/45-evdev.conf #the last Section should have the "touchscreen" in the "Identifier", where under that Section you'll want to add the last "Calibration" Option as follows: Section "InputClass" Identifier "evdev touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Driver "evdev" Option "Mode" "Absolute" Option "InvertX" "false" Option "InvertY" "false" Option "SwapAxes" "true" Option "Calibration" "14439 1969 14196 2277" EndSection >> Ctrl-X, Save? >> Y, Enter > sudo reboot now
After rebooting, the touch screen should work great. Happy trails.
> su - > pip3 install --upgrade pip wheel setuptools virtualenv > pip3 install --upgrade psycopg2 netifaces requests-toolbelt beautifulsoup4 > python3 -m virtualenv kivy_venv > pip3 install kivy[full] kivy_examples
Please Register / Login here to post or edit comments or questions to our blog.
Back to the Main Blog Page