lvgl / lv_binding_micropython

LVGL binding for MicroPython
MIT License
237 stars 156 forks source link

Add an evdev touchscreen driver #228

Open lodygaw opened 1 year ago

lodygaw commented 1 year ago

Based on lv_drivers/indev/evdev.c

Back in the day, I added a touchscreen driver for my own use. I thought it might be useful for someone. Improvements and suggestions are expected and appreciated.

amirgon commented 1 year ago

Hi @lodygaw, thank you for this contribution!

On which hardware did you test this?

I would like to try it out on my laptop which contains a touch pad, but I'm not sure how to select the right /dev/input/eventX device. Any idea?

lodygaw commented 1 year ago

I was testing this on Raspberry Pi Zero 2 with Raspbian OS Lite (Raspbian GNU/Linux 11 (bullseye)). Tested displays were:

All were 1024x600 HDMI + USB (touch) displays.

When it comes to selecting /dev/input/eventX, in my case it was event0 for Waveshare displays and event1 for a Chinese one as far as I remember. But when I was figuring it out at the beginning then I was using evtest tool (it was very handy for debugging as well).