Attempting to run littleVGL demos on Raspberry Pi 3 with the ‘official’ 7" touchscreen display. Struggling with touchscreen. Also uncertain of how SDL\terminal text input relate to LittleVGL.
What MCU/Processor/Board and compiler are you using?
Raspberry Pi 3
What do you want to achieve?
Use LittleVGL on a framebuffer from a RaspberryPi with the official 7" touchscreen device.
What have you tried so far?
As far as I can tell, I have exhausted Google searches and the forum. I have found several relevant posts here, and a few web pages via google. Using this info I have been able to get the screen working at the correct resolution and compile. However I havent been able to get mouse, keyboard or touchscreen input to work.
One initial confusion I am having is that many examples reference indev_drv.read = evdev_read;, but the compiler complains. Is indev_drv.read_cb a new version of the method everyone is using in the example code? Is there a better driver to be using for this device? It shows up using evtest. It works fine on /dev/input/event0
I am also trying to figure out how to compile with mouse or keyboard support, though my final application will just be touchscreen. I have both enabled in lv_drv_conf.h, I think, however neither work when I run the program. When I type on a keyboard, it just shows text on the screen. and does not seem to respond
Any advice would be great!
I will post code if it seems helpful. Right now it wont let me attach.
Probably the examples you are reading are for LittlevGL 5.3. There were some minor changes made to input device APIs in LittlevGL 6.0 (one of which was making callback names end with _cb).
I strongly recommend starting out with the repository @deonm recommended, although since you mentioned that you already have the display itself working, I wouldn’t bother switching now if you didn’t start with that.
The code you sent should work. Did you configure the right evdev device in lv_drv_conf.h? Can you set a breakpoint inside the while loop in evdev_read and see if it ever reads any data?
Thank you for your replies. I have already been through everything I could find with google, including your recommended resource. So far nothing helped me get the touchscreen working. To be fair, I also still have not managed to get the mouse or keyboard input working either, though I have not been trying, instead working in the PC simulator to rough up my application.
Once I have had some more experience, I will come back and report what fixed it, or come back with more pointed questions. Setting up some watch variables and stepping through will be a next step for sure.
If anyone has any general notes on running 'headless (no x windows?)" linux framebuffer with keyboard/mouse input? When running my program from the terminal, if I type, it just shows up on the screen. Is this prevented by the program being configured properly, or do I need to figure out how to turn off the display of keystrokes?
I have not re-visited running LVGL on the Raspberry Pi with touchscreen since posting the original request for help.
I will be getting around to it in the next day or two, hopefully later today. I had to set it aside, and was discouraged when the forum immediately locked me out for copy-pasting code too fast for a new user, or something like this.
Thank you for the note on the console text output!
Thanks for the heads-up; I’ll have a look at the settings. We do encourage people to show their code so it shouldn’t be blocking them for copying and pasting it.
I don’t recall seeing any message. The board let me make one post right after signing up, but then it locked me out until I contacted you.
I am now trying to figure out how to remote-debug my C code on the raspberry Pi, since I am not writing\compiling on the Pi itself, and have zero interest in doing so.