ImpulseAdventure / GUIslice

GUIslice drag & drop embedded GUI in C for touchscreen TFT on Arduino, Raspberry Pi, ARM, ESP8266 / ESP32 / M5stack using Adafruit-GFX / TFT_eSPI / UTFT / SDL
https://www.impulseadventure.com/elec/guislice-gui.html
MIT License
1.16k stars 209 forks source link

Wiki for User controls / More user friendly code #221

Open shafr opened 4 years ago

shafr commented 4 years ago

Feature Request or Enhancement

GUIslice is very advanced library for creating GUI for MCU's, but it is very harsh with newcomers, when they are facing C code and trying to figure out what to do (with devices that are not touch screen). Sadly some of us lack C/C++ programming experience and most of code that is done is just importing of libraries, instantiating them and using methods over those libraries in loop routine.

There are some different input devices:

Some of them don't have well implemented libraries with events / interrupts implemented so user have to do GPIO reading and handling in a loop or some other way.

There few options that can help:

shafr commented 4 years ago

Something like here with steps: https://github.com/igorantolic/ai-esp32-rotary-encoder#Details

ImpulseAdventure commented 4 years ago

Hi @shafr -- those are some great suggestions.

Although we have the ex21_ard_input_pin example to demonstrate how to manipulate a GUI with external buttons, it is might not be generic enough for users to see how to integrate other input devices.

Let me look at some example peripheral libraries (perhaps a rotary encoder) or other GPIOs and see if I can create a simple example demonstrating how one can integrate. I would probably start with an new example, but may end up creating a wiki page (as you have indicated) if that looks more appropriate to handle different use-cases.

MickTheMechanic commented 3 years ago

How did you go with this? I am now introducing a rotary coder into my tire tool project. A simple example would be awesome.

ImpulseAdventure commented 3 years ago

For reference, I posted an example of how one might do this with an encoder in #348 .

krdarrah commented 2 years ago

Hello, I am also trying to get joystick control, but only see Focus Next and Previous actions available. These work fine for left/right buttons, but how can up/down buttons be used? Specifically, I'm trying to get these to work with the virtual keyboard... not user friendly to only have left/right navigation when typing. Let me know if possible, thanks!