Menu library for touch screens and/or mechanical buttons - ILI9341 displays

  Рет қаралды 21,104

Kris Kasprzak

Kris Kasprzak

Күн бұрын

Пікірлер: 88
@garyblackwood9459
@garyblackwood9459 6 ай бұрын
I must admit this looks really great, just what I was looking for. I had started on a simple settings menu of my own but it is just that very simple at the moment. Like you I used a list of objects each one specifying type, min, max values and increment plus a callback method to set the current value so its new value can be set while it is being changed and then on exit you decide to keep the new value or go back to the original value. I will try out your excellent library as it does so much more and no point in reinventing the wheel, thanks for sharing.
@asifehsan4948
@asifehsan4948 6 ай бұрын
Dear sir, thanks for providing such a wonderful tutorial. I learn lot of things from your videos. I make a project with Esp32 tft display and add a function to control led on off using menu and it perfectly works. You have such a great knowledge. I am very happy. ❤❤❤❤
@KrisKasprzak
@KrisKasprzak 6 ай бұрын
Glad I could help!
@DigitalDivotGolf
@DigitalDivotGolf 3 жыл бұрын
Thank you! Your videos are very helpful. I will try this library out and hopefully I can clean up my touch screen projects!
@KrisKasprzak
@KrisKasprzak 3 жыл бұрын
Glad it was helpful!
@AlexLiedl
@AlexLiedl Жыл бұрын
Came across this and this looks to be exactly what i am looking to incorporate into my project. Will admit, I am very new to this space. My challenge so far is finding a capacitive touchscreen less than 3 inches. I found one on amazon that uses the ili9341v driver. I see your repo mentions ili9341_t3. Do you think there will be any compatibility issues? Curious what screen you are using in your video.
@KrisKasprzak
@KrisKasprzak Жыл бұрын
If ili9341v uses the Adafrut_GFX library, my library can be adapted with around 10 lines of code changes. If the ili9341v does not use the Adafruit_GFX, this lib can't be used. I generally use displays like this www.amazon.com/DIANN-ILI9341-Display-320x240-Screen/dp/B0BNQBKFCT/ref=sr_1_4?crid=2KCRYW9FBAXRC&keywords=2.8%22%2BTFT&qid=1702491153&sprefix=2.8%2Btft%2Caps%2C81&sr=8-4&th=1 Also if you are using Arduinos, this lib will most likely not work--memory or other issues. I user Teensy 95% of the time ESP32 the other
@AlexLiedl
@AlexLiedl Жыл бұрын
@@KrisKasprzak Thanks so much for the info! I’m reviewing your repo now! I placed my amazon order and cannot wait to try this out. If this works, you have solved for me what i have been scratching my head on for over 3 months!!! True life saver!!
@NicholasRadina
@NicholasRadina 2 жыл бұрын
Well done! Thank you!
@KrisKasprzak
@KrisKasprzak 2 жыл бұрын
Glad it was helpful!
@hamedtaran2102
@hamedtaran2102 2 жыл бұрын
Thanks a lot 🙏
@KrisKasprzak
@KrisKasprzak Жыл бұрын
You're most welcome
@SHULIN-rf6tr
@SHULIN-rf6tr 2 ай бұрын
awesome,are you consider use LVGL?
@KrisKasprzak
@KrisKasprzak 2 ай бұрын
I have not, I do have a utility PowerPoint that will create.INO files from slide content. Using that utility you create your UI using PowerPoint then with a push of a button, it will create graphics in an INO file.
@ThermaLTake94
@ThermaLTake94 Жыл бұрын
Greetings from greece kris!! what an awesome library,im using an esp32 with the tft_eSPI library,can i incorporate your library with what i already use?
@KrisKasprzak
@KrisKasprzak Жыл бұрын
You definitely will not be able to use this library directly. I took a quick look at the class definition and it’s very similar to the library I’m using. give me a week or so and I’ll see what it would take to port this over.
@carlosbarberis49
@carlosbarberis49 2 жыл бұрын
Although I think these menus you created are great, I don't see anyway to specify the SPI control signals for the ILI9341 TFT display as well as touch screen that comes with that display. I'm I missing something here? Thank you.
@KrisKasprzak
@KrisKasprzak 2 жыл бұрын
you pass in the display object so the lib can draw stuff. You use what ever touch lib you prefer and process touch accordingly.
@nomlas0803
@nomlas0803 2 жыл бұрын
Nicely done! How do you suggest handling free text input, like SSID, password, etc? Using encoder to spin through the alphabet would be good enough for infrequently changed fields.
@KrisKasprzak
@KrisKasprzak 2 жыл бұрын
Thanks! One of the touch libraries has a keypad example for touch screens. while it only supports 0-9 as input I can see how this concept could be used to emulate a keyboard for keystroke input.
@waynegalaugher5638
@waynegalaugher5638 2 жыл бұрын
I have a TEENSY 3.2 with an Adafruit 2.8 TFT SPI Cap touch. I used your Pin defines but it won't compile I tried with a 4.1 teensy ; no joy. The teensy works with the display with Teensy 3.2 with simple sketch but no cap touch. I'm following the pin defines in the sketch. Getting close but no joy. I think it's the libraries that are killing things. Retrying on different computer!
@KrisKasprzak
@KrisKasprzak 2 жыл бұрын
Yikes I don't think the lib here will work with cap touch devices--different chip i'm sure.
@FAR-SOFT
@FAR-SOFT 11 ай бұрын
i just started working with esp32 and tft, any link to an tutorial how to install this library on arduino ide? I looked for this library in the arduino ide library manager, but I couldn't find it.
@saydiy1528
@saydiy1528 Жыл бұрын
good job. what image convert app you used please?
@KrisKasprzak
@KrisKasprzak Жыл бұрын
javl.github.io/image2cpp/
@saydiy1528
@saydiy1528 Жыл бұрын
@@KrisKasprzak Thank you. did you try move the menu up/down by finger instaed of the arrow?
@larbigueraiche6721
@larbigueraiche6721 Жыл бұрын
Good job. What is the difference between LED_PIN and PIN_LED in Mega2560_Menu_TouchInput.ino ? Thanks.
@KrisKasprzak
@KrisKasprzak Жыл бұрын
probably a typo. either control the display on / off
@mitmicrocontroller475
@mitmicrocontroller475 2 жыл бұрын
Sir, Is you used built in SPI pin?
@theunmannedcollectiv
@theunmannedcollectiv Жыл бұрын
Is there any wiring schematic for your code? I think I had connected correctly but struggling to get things to work, Code has uploaded cleanly, yet no menu, it’s a beautiful project, hoping to get past square one, thank you!!
@KrisKasprzak
@KrisKasprzak Жыл бұрын
Can you get any of the display driver examples to work?
@theunmannedcollectiv
@theunmannedcollectiv Жыл бұрын
@@KrisKasprzak I had the drivers and test code working on my UNO but I am thinking I have something off in the MEGA is there was a fritzing or something I could check against?
@theunmannedcollectiv
@theunmannedcollectiv Жыл бұрын
I have the screen working but which pins on Arduino Mega are T-DO, T-DIN-T-CS-T-CLK?
@theunmannedcollectiv
@theunmannedcollectiv Жыл бұрын
ok, it is working sort of, touch works, screen and menu works, but touch is way off and after a few selections it goes to a screen flashing done in blue and red
@akhilavissomraju1245
@akhilavissomraju1245 Жыл бұрын
hey its an amazing video...can you share the connections between the display and the esp32 cuz whenever i run the code.. the display is white...i checked the connections in the user setup file of the ili9341 display and tried to connect it like that but its not working....thank you
@KrisKasprzak
@KrisKasprzak Жыл бұрын
I use the same pinout that is listed in the comment block in the example .ino. Can you even get the examples running that deliver with the Adafruit_ILI9341 library?
@akhilavissomraju1245
@akhilavissomraju1245 Жыл бұрын
@@KrisKasprzak sorry for the late reply..yes examples from adafruit_ILI9341 work but not the touch. can you tell me the touch pins connections to the esp. oh and also currently i am working with esp 32s2
@connalmcilwraith4367
@connalmcilwraith4367 2 жыл бұрын
Hi - I think your menu looks fantastic and I'm really keen to incorporate it in my project. I am using an ESP32 and an rotary encoder and, according to your Git Hub page, your touch sensor for ESP32 should allow me to switch off the touch screen and use a mechanical input instead. However, I can't see any code for an encoder. Am I missing something? Keep up the good work, though!
@KrisKasprzak
@KrisKasprzak 2 жыл бұрын
I’ve got an example for an encoder I’ll post it soon
@connalmcilwraith4367
@connalmcilwraith4367 2 жыл бұрын
@@KrisKasprzak thanks!
@KrisKasprzak
@KrisKasprzak 2 жыл бұрын
here you go! github.com/KrisKasprzak/Adafruit_ILI9341_Menu/tree/main/Examples/ESP32/ESP32_Menu_EncoderInput
@connalmcilwraith4367
@connalmcilwraith4367 2 жыл бұрын
@@KrisKasprzak Fantastic! It works perfectly. Thanks so much.
@connalmcilwraith4367
@connalmcilwraith4367 2 жыл бұрын
Hi - I've found one issue (not with your code) but I need to use a different screen driver, specifically tft_eSPI, as all my colours are inverted. However, if I do use the new driver, the compile stalls at the fonts because the eSPI driver expect the font in a different format. The menu.init in Adafruit_ILI9341_Menu.h is expecting 'setFont' and eSPI is expect 'setFreeFont' (I think). I've tried changing this (and many other pemutations) but I haven't had any success yet. Any suggestions? Thanks
@alanlautenslager7141
@alanlautenslager7141 Жыл бұрын
Yes I am just getting started with Arduino. Have a lot to learn at 75 years old. I have nothing but Arduinos from Nanos to Megas. Can I use this for Mega 2560? Is there a script available that I can look at and learn a lot from it? Thank you!
@KrisKasprzak
@KrisKasprzak Жыл бұрын
You can use this with a Mega2560, just make sure you use the Adafruit_ILI9341 display libraries and my Adafruit_ILI9341_Menu library. There are examples in both libs that can help you get started. I'd recommend getting the display working first
@alanlautenslager7141
@alanlautenslager7141 Жыл бұрын
@@KrisKasprzak Thank you for your reply. I guess I am looking for the script to enter into my IDE but cannot locate it or is this something I have to attempt to create? Like I said this is all new to me! :)
@alanlautenslager7141
@alanlautenslager7141 Жыл бұрын
Another question Kris - Again showing my lack of knowledge. If I understand your code is for a Teensy device? So if I use the Adafruit_ILI9341 librarys that makes it work with the Arduino?
@pieterveenders9793
@pieterveenders9793 Жыл бұрын
Much respect to you Alan, I'm 33 and fairly good with computers, yet still find my first steps into Arduino quite daunting. You're the living proof that you never stop learning!
@gaal8762
@gaal8762 9 ай бұрын
Hello . Writes an error 'ILI9341_NAVY' was not declared in this scope 'ILI9341_DARKGREEN' was not declared in this scope 'ILI9341_DARKCYAN' was not declared in this scope 'ILI9341_MAROON' was not declared in this scope And a lot of this as well as 'elapsedMillis' does not name a type
@KrisKasprzak
@KrisKasprzak 9 ай бұрын
It doesn’t sound like you’ve got the libraries installed.
@gaal8762
@gaal8762 9 ай бұрын
@@KrisKasprzak Thank you, I understand, I found your other code for mega 2560. Another question: for mega 2560 you need to connect only these contacts ? #define T_CS 3 #define T_IRQ 2 #define TFT_DC 48 #define TFT_CS 53 #define TFT_RST 49 #define PIN_LED 26 Do I need to connect MISO to 50 end MOSI to 51 ? Where to connect #define LED_PIN 26 ?
@gaal8762
@gaal8762 9 ай бұрын
@@KrisKasprzak Do you need matching resistors between the display and mega 2560?
@projetbandyakama3889
@projetbandyakama3889 2 жыл бұрын
Hello; I'm working a 3.5 inch TFT with ILI 9488 as driver; how can I make the touch screen work with it and which library should I use?
@KrisKasprzak
@KrisKasprzak 2 жыл бұрын
What MCU are you using? This library could be easily adapted to work with other libraries provided they are based on the adafruit_GFX library. The read me posted on the kid hub page has a note on what he would need to edit.
@projetbandyakama3889
@projetbandyakama3889 2 жыл бұрын
@@KrisKasprzak thanks for replaying ! I ´ m using Esp32 and my TFt 3.5 inch is on 8bit parallel mode (ILI9488) , it s work for display but I never found an adafruit library for touch.
@glebetech6943
@glebetech6943 4 ай бұрын
Something appears to be broken with the library. I tried to install and run it on an ESP32 using Arduino 2.x and all the latest libraries. I also reverted the Arduino IDE to 2.1.8 and got exactly the same, multiple errors. It complains that a variable is not defined in the library rather than the arduino sketch. I have raised an issue. I was trying to use the touch functionality. Has anyone else experienced issues with this library?
@KrisKasprzak
@KrisKasprzak 4 ай бұрын
I’ll take a look. I use this lib all the time so I’m sure it’s something simple.
@glebetech6943
@glebetech6943 4 ай бұрын
@@KrisKasprzak I am going to try a complete re-install of the library and see if that helps.
@glebetech6943
@glebetech6943 4 ай бұрын
@@KrisKasprzak So, I removed the libary from the Arduino library folder, extracted the downloaded zip, removed the 'main' extension and copied the library into the Arduino libraries folder. I then opened the touch example, I set the board to ESP32 dev and set the com port. I got exactly the same result, the example will not compile and has a similar list of faults to those I placed on the Github Wiki. Hopefully you can spot the issue which is likely something I have done wrong.
@KrisKasprzak
@KrisKasprzak 4 ай бұрын
@@glebetech6943 i have fixed the issue, somehow and not sure how, the variable 'data' was deleted from the .h file. You can download the library and overwrite you current or simply add the following line to the file: Adafruit_ILI9341_Menu.h float data[MAX_OPT+1];
@glebetech6943
@glebetech6943 4 ай бұрын
@@KrisKasprzak I downloaded the new library and it compiles with a warning about a deprecated pcnt driver. However, when I loaded it to an ESP32 it continuously printed out a WDT error so I disbled the WDT function at line 1598, 1599, that removed the continous error message but the display is blank. I'll double check the connections and try another ESP32 tomorrow.
@ipadize
@ipadize 2 жыл бұрын
does it work with ST7789?
@KrisKasprzak
@KrisKasprzak 2 жыл бұрын
What MCU are using?
@ipadize
@ipadize 2 жыл бұрын
@@KrisKasprzak Teensy 4.1
@kunkhmer5246
@kunkhmer5246 2 жыл бұрын
Hi Kris, will this library work with ILI9488 SPI?
@KrisKasprzak
@KrisKasprzak 2 жыл бұрын
Not as is. There are a few lines in the .h and .cpp you need to change to get it to work with the ILI9488 driver. Basically the obj definitions and the variable type. What MCU are you using?
@kunkhmer5246
@kunkhmer5246 2 жыл бұрын
@@KrisKasprzak Thank you Kris, I will give it a try.
@kunkhmer5246
@kunkhmer5246 2 жыл бұрын
@@KrisKasprzak I'm using ESP32 Dev. Module
@cooljackwi
@cooljackwi 2 жыл бұрын
Can i use both? The encoder and the Touch?
@KrisKasprzak
@KrisKasprzak 2 жыл бұрын
Someone else asked the same, I’ll take a look
@KrisKasprzak
@KrisKasprzak 2 жыл бұрын
I have updated the library to allow touch AND mechanical input. You can press menu items, then use something like and encoder to scroll through values. I have added an example for using Touch and and Encoder, noting that since you are having to trap encoder and touch, there is more processing code. Fortunately I was able to get both working w/o any method changes so this version should re-compile without errors. I have done a fair amount of testing, but if you see any issues, let me know. github.com/KrisKasprzak/ILI9341_t3_Menu Have fun..
@cooljackwi
@cooljackwi 2 жыл бұрын
@@KrisKasprzak i appreciate your work and will give it a try and let you know the outcome
@mitmicrocontroller475
@mitmicrocontroller475 2 жыл бұрын
How to declare for SPI pin
@KrisKasprzak
@KrisKasprzak 2 жыл бұрын
You don’t the display manages that. Once you have the display object created, you passed the display object into this library.
@jumbo999614
@jumbo999614 4 ай бұрын
how to use rgb in ILI9341 library? I'm trying to do this: tft.fillRoundRect(175, 87, 310-175, 119-87, 3, RGB(xRC,xGC, xBC)); doesn't work.
@KrisKasprzak
@KrisKasprzak 3 ай бұрын
The RGB method is on the display object so you have to call that appropriately. Something like this Display.RGB(255, 0 ,0); If you wish to use hex values, it would be like this Display.RGB (0xC, 0xC,0xC); Note display is your display object whatever you happen to name it
@JOHNSMITH-ug2mt
@JOHNSMITH-ug2mt Жыл бұрын
Ok, I'm a nooby...I have a mega2560, What Display would I use with this?
@KrisKasprzak
@KrisKasprzak Жыл бұрын
Can you set some parameters? What size display are you looking for? Do you want touch? While your options are limited to displays with the ILI9341 chip, you do have some choices. It’s hard to say without knowing much more.
@JOHNSMITH-ug2mt
@JOHNSMITH-ug2mt Жыл бұрын
@@KrisKasprzak 3.5 touchscreen if possible. thx!
Menu library for Touch and mechanical controls - ILI9341 displays
11:46
Cheap and Easy to Use ESP32 Screen!
8:21
Brian Lough
Рет қаралды 190 М.
КОТЁНОК МНОГО ПОЁТ #cat
00:21
Лайки Like
Рет қаралды 2,8 МЛН
The perfect snowball 😳❄️ (via @vidough/TT)
00:31
SportsNation
Рет қаралды 77 МЛН
I shouldn't be in the house  It's so embarrassing
00:22
Funny Parent-Child Videos
Рет қаралды 8 МЛН
Мем про дорожку
00:38
Max Maximov
Рет қаралды 4,4 МЛН
Using a 2.8in SPI LCD Touchscreen ILI9341 with an ESP32 on the new Arduino IDE 2
10:34
I Made The Ultimate Cheating Device
9:39
ChromaLock
Рет қаралды 1,9 МЛН
The BEST Mechanical Display You've EVER Seen!!
13:51
Tin Foil Hat
Рет қаралды 626 М.
Using a 2.8in SPI LCD Touchscreen ILI9341 with an ESP32 on Platformio
13:18
Retro Tech & Electronics
Рет қаралды 12 М.
Arduino Touchscreen Display - Using a Resistive Touchscreen
38:51
DroneBot Workshop
Рет қаралды 417 М.
PlatformIO: All you need to know in 10 Minutes!
10:56
J's e-shack
Рет қаралды 357 М.
How to use and why to use Sprites  (TFT_espi Programing tutorial)
13:30
КОТЁНОК МНОГО ПОЁТ #cat
00:21
Лайки Like
Рет қаралды 2,8 МЛН