harmon25

harmon25

Hi all,
Looking for some help setting up a nerves rpi3 kiosk using an asus touch screen

I am starting with this system - GitHub - nerves-web-kiosk/kiosk_system_rpi3: Nerves QtWebEngine Kiosk system for Raspberry Pi 3 · GitHub.

I have one problem, the display is oriented in portrait, I have it rotated correctly via display_rotate=1 in config.txt but the touch input is now off.

I was able to solve this with an x11 debian based system using the following command

xinput set-prop 'ILITEK ILITEK Multi-Touch' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1

Here is a link to pretty much the same problem - solved in a similar way:
https://www.raspberrypi.org/forums/viewtopic.php?t=205592

Any idea how I could go about solving this with a nerves system? Is it possible?

Thanks for the help!

EDIT:
This a similar thread,
https://forum.elixirforum.com/t/nerves-connecting-a-touch-screen

I am unsure how to apply that advice though…

Showing Posts 1 to 3

harmon25

harmon25 OP

I found more tips on a possible solution.
It requires setting some QT_ environment variables. I presume before building QT?

This is also similar, with a slightly different but promising option:

QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/eventX
QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/eventX:rotate=0

EDIT:
Here is some related dmesg output from my nerves kiosk device

...
usb 1-1.2: new full-speed USB device number 4 using dwc_otg
usb 1-1.2: New USB device found, idVendor=222a, idProduct=0045, bcdDevice= 0.02
usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.2: Product: ILITEK Multi-Touch
usb 1-1.2: Manufacturer: ILITEK
input: ILITEK ILITEK Multi-Touch Touchscreen as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:222A:0045.0001/input/input0
hid-generic 0003:222A:0045.0001: input,hiddev96,hidraw0: USB HID v1.10 Device [ILITEK ILITEK Multi-Touch] on usb-3f980000.usb-1.2/input0
...
...
input: ILITEK ILITEK Multi-Touch as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:222A:0045.0001/input/input8
hid-multitouch 0003:222A:0045.0001: input,hiddev96,hidraw0: USB HID v1.10 Device [ILITEK ILITEK Multi-Touch] on usb-3f980000.usb-1.2/input0
mobileoverlord

mobileoverlord

Co-author of Nerves

We used the kiosk_system_rpi3 Nerves system with Dell touch screen devices. The system has some generic support for USB touch screens enabled but getting QT (webengine_kiosk) to recognize the hot plug events for the USB touch screen required udev. There is room for improvement in this area, but here is an example of how we started udev as part of our application initialization. kiosk_system_rpi3/example/lib/example/application.ex at main · nerves-web-kiosk/kiosk_system_rpi3 · GitHub

harmon25

harmon25 OP

Thanks @mobileoverlord, I have been using the example app as reference, and the screen does work well by default!

My problem is operating the display vertically, I need to rotate the touch input.
I have come up with a solution that seems to work, albeit does not perform as well as the monitor in its default orientation…

I am running the following before launching the WebengineKiosk

 :os.cmd('udevd -d')
 :os.cmd('udevadm trigger --type=subsystems --action=add')
 :os.cmd('udevadm trigger --type=devices --action=add')
 :os.cmd('udevadm settle --timeout=30')

 System.put_env("QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS", "/dev/input/event0:rotate=270")
 System.put_env("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-gpu")

QT_QPA_EGLFS_ROTATION

actually just rotates the display but has no impact on touch input, -90 is what i need based on the orientation of my display - might be able to rotate the display normally and just leverage the next step…

Rotating the display via config.txt - and tweaking the below parameter seems to have worked well!
This is the solution! woo :smile: QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS

event0 is the device name for my touch screen events, and setting rotate=270 gets the touch input oriented as needed

When not messing with the orientation and just having udevd enabled, the touch screen works very well. Things like swiping to scroll, and pinch to zoom are accurate. after tweaking the settings as above those functions are a bit shaky and the touch does not seem as responsive.

Here is a link to the relevant QT documentation:

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews