Menu library for Touch and mechanical controls - ILI9341 displays

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ต.ค. 2024

ความคิดเห็น • 54

  • @rdyer8764
    @rdyer8764 2 ปีที่แล้ว +3

    Hey Kris, this looks GREAT, as usual. I like that you're also a Teensy fan! I saw it immediately when I noticed the "_t3" in your library calls. Anyway, I usually use the RA8875, so I'll take a look at your code to see what changes I will have to make. By the way, are you using the PJRC Encoder library? Is it any better than the Arduino library regarding the contact-bounce issue?
    I've used your graph displays before. I'm guessing this will be just as fun. Take care.

    • @KrisKasprzak
      @KrisKasprzak  2 ปีที่แล้ว +2

      The mandatory requirement is that the display driver relies on the Adafruit_GFX--or have similar calls for fillRect() etc. Assuming your display does, the changes would be something like the following (found in the .h and .cpp)
      1. changing the object type such as ILI9341_t3 *d; to accept the different display driver
      2. changing the font object types such as ILI9341_t3_font_t itemf;
      3. you may have to pass the fonts differently in the init calls--but i don't recall how that driver defines fonts
      4. change the includes of course
      Sounds painful, but actually easy to do.

    • @rdyer8764
      @rdyer8764 2 ปีที่แล้ว

      @@KrisKasprzak Thanks. I guessed that it would rely heavily on the Adafruit_GFX calls, so that makes sense. Since there's also a Teensy version of the RA8875 driver, things will probably go smoothly. Famous last words... There always seems to be one line of code that I miss that causes frustration for a day or two. :)) Take care.

  • @johnnyvanaardt5356
    @johnnyvanaardt5356 หลายเดือนก่อน

    Hi, will this library work with IlI9486 TFT LCD, i use a "Wave 4 inch Touch Shield for Arduino" with a I2C 4x3 keypad

  • @jetpedals
    @jetpedals ปีที่แล้ว

    Hey Kris. Great menu code here! Hoping you can help with one thing... I am trying grab data from EEPROM stored in a String variable and trying to get that to populate for the text in menu items. I've converted the String to a char array, and while everything compiles the data is empty on the screen. I'm guessing this has something do with passing the memory address instead of the actual data... any thoughts on this would be greatly appreciated!

    • @jetpedals
      @jetpedals ปีที่แล้ว

      Here's the code that I'm using that will compile but display's empty data. I can print bankName to the serial monitor and it display's the anticipated data.
      char charArray[16];
      String bankName = getStringValue(1300, 16);
      bankName.toCharArray(charArray, sizeof(charArray));
      ProgrammingOption1 = ProgrammingMenu.addNI(charArray);

    • @KrisKasprzak
      @KrisKasprzak  ปีที่แล้ว

      I'll work something up, but i can't get to it for a week or so.

    • @jetpedals
      @jetpedals ปีที่แล้ว

      @@KrisKasprzak thx for your help! I’ll let you know if I get anything to work in the meantime.

  • @beatrute2677
    @beatrute2677 ปีที่แล้ว

    Thank you Kris for the video and the libraries, it has managed to fill in alot of the blanks in my limited knowledge of coding

  • @gaal8762
    @gaal8762 7 หลายเดือนก่อน

    There are always errors during compilation, some fonts are missing, libraries are missing.""" exit status 1
    'Arial_24_Bold' was not declared in this scope"" Do you have everything downloaded together with libraries, fonts and so on, thank you for your work!

    • @KrisKasprzak
      @KrisKasprzak  7 หลายเดือนก่อน

      What display driver are you using?

    • @gaal8762
      @gaal8762 7 หลายเดือนก่อน

      @@KrisKasprzak ILI9341 Mega 2560

  • @phenyl22
    @phenyl22 2 ปีที่แล้ว

    Hi Kris
    Thank you very much for the library, I compiled it on an Arduino Due and started playing around a bit. How would I proceed to implement running a function from the menu? As I understand at the moment I can set up the variables in the menu and then exit back to the program. But I'd like to set up my process in the menu and then run it from there and be returned to the menu automatically.
    Thank you very much for any hints

    • @KrisKasprzak
      @KrisKasprzak  2 ปีที่แล้ว

      If you are using the item menu it should be pretty straightforward. In the loop where you’re trapping menu pushes just have a function called in there if this doesn’t make sense I’ll try to work up an example

  • @brendan9650
    @brendan9650 2 ปีที่แล้ว

    This looks great. Going to try and implement this in my project.
    Any thoughts on making this work with the TFT_eSPI library? Would allow it to work with a wide variety of displays.

    • @KrisKasprzak
      @KrisKasprzak  2 ปีที่แล้ว

      If that library supports adafruit_GFX I think is about 6 to 8 lines of code changes to get it to work with that library

    • @brendan9650
      @brendan9650 2 ปีที่แล้ว

      @@KrisKasprzak Thanks for the quick reply. I'll have to dig into your library and see what changes are needed.

    • @KrisKasprzak
      @KrisKasprzak  2 ปีที่แล้ว

      @@brendan9650 I would definitely have to scan the code but I think all you need to do is change the object data types in the.H and ,cPP files. I did this for an ST7735 display but unfortunate the little baby arduino powering it ran out of RAM

    • @toddroles3234
      @toddroles3234 2 ปีที่แล้ว

      Any results on this. I am very interested...

  • @rarenu
    @rarenu 2 ปีที่แล้ว +1

    One of the best article on TFT menu, Sub-menus and its options.
    Any chance of modifying this to work with ESP32. Please advice. Thank you for this project.

    • @KrisKasprzak
      @KrisKasprzak  2 ปีที่แล้ว

      What display driver are you using? I have an ESP32 but use and #include "Adafruit_ILI9341.h" driver. The mandatory requirement is that the display driver relies on the Adafruit_GFX. Assuming your display does, the changes would be something like the following (found in the .h and .cpp)
      1. changing the object type such as ILI9341_t3 *d; to accept the different display driver
      2. changing the font object types such as ILI9341_t3_font_t itemf;
      3. you may have to pass the fonts differently in the init calls--but i don't recall how adafruit defines fonts
      4. change the includes of course
      Sounds painful, but actually easy to do.

    • @rarenu
      @rarenu 2 ปีที่แล้ว

      @@KrisKasprzak I have ili9341 and I can make changes to use other display libraries, but I don't know what to change in your Menu library file to use it with other display drivers like Adafruit_ILI9341 or TFT_eSPI etc.,. Because it is asking for Teensy and do not permit compiling with this error message.
      In file included from C:\Users
      agot\Downloads\ILI9341_t3_Menu-main\ILI9341_t3_Menu-main\Examples\MultipleMenus\ILI9341_t3_Menu.h:48:0,
      from C:\Users
      agot\Downloads\ILI9341_t3_Menu-main\ILI9341_t3_Menu-main\Examples\MultipleMenus\MultipleMenus.ino:20:
      C:\Users
      agot\Documents\Arduino\libraries\ILI9341_t3-master/ILI9341_t3.h:59:2: error: #error "Sorry, ILI9341_t3 does not work with Teensy 2.0 or Teensy++ 2.0. Use Adafruit_ILI9341."
      #error "Sorry, ILI9341_t3 does not work with Teensy 2.0 or Teensy++ 2.0. Use Adafruit_ILI9341."
      Please help. With best regards,

    • @KrisKasprzak
      @KrisKasprzak  2 ปีที่แล้ว

      @@rarenu can you be more specific and tell me what board you are using and what display library?

    • @rarenu
      @rarenu 2 ปีที่แล้ว

      @@KrisKasprzak Thank you. I am using ESP32- 30-pin Devkit and my display is ILI9341- 2.8 inch TFT 320x240 SPI . Display libraries are Adafruit_GFX.h and Adafruit_ILI9341.h.

    • @KrisKasprzak
      @KrisKasprzak  2 ปีที่แล้ว

      @@rarenu I added a new CPP and H for Adafruit_ILI9431 displays. I have also added an example for the ESP32
      Have a look in this NEW repository
      github.com/KrisKasprzak/Adafruit_ILI9341_Menu
      Make sure you install it to the Arduino/Libraries folder.
      There is a ESP32 example for you.

  • @hansfoster4610
    @hansfoster4610 ปีที่แล้ว

    Hey Kris, great work, I'd love to test but I do not know what I did wrong, but with your ESP example my screen stays black (serial Monitor says: "Enable State...")

    • @KrisKasprzak
      @KrisKasprzak  ปีที่แล้ว +1

      wiring? Can you get an example from the display library working?

    • @hansfoster4610
      @hansfoster4610 ปีที่แล้ว

      @@KrisKasprzak thanks for your tipp!! I changed settings for pins,irqs, etc, now it works!,

  • @theweazel
    @theweazel ปีที่แล้ว

    Cool menu! Thank you for this. I got it running on my Teensy 4.1, but when I exit it out it goes to a page that says "DONE" and I can't get out of it!

    • @KrisKasprzak
      @KrisKasprzak  11 หลายเดือนก่อน +1

      It’s just an example on how to exit the menu completely. I’m guessing you’ll have some kind of a set up button that kicks off a menu? If so, you need a way to get out of the menu and this example shows how to do that

    • @theweazel
      @theweazel 11 หลายเดือนก่อน

      @@KrisKasprzak No, I just assumed you would always be in the menu. Why would I want to leave?

  • @controlsprocess
    @controlsprocess 9 หลายเดือนก่อน +1

    Nice Library good work

    • @KrisKasprzak
      @KrisKasprzak  9 หลายเดือนก่อน

      I'm glad you like it

  • @mohamedsiddik0
    @mohamedsiddik0 8 หลายเดือนก่อน

    Hi Kris,
    Very good Library and useful video. Can you please post the video for ESP_IDF framework.
    Thanks Advance.

  • @zanadev2030
    @zanadev2030 6 หลายเดือนก่อน

    how to install this library in arduino ide? thnx

  • @rossquaresmini5834
    @rossquaresmini5834 2 ปีที่แล้ว +2

    Bravissimo !(;=))

  • @DigitalDivotGolf
    @DigitalDivotGolf 2 ปีที่แล้ว +1

    Could you please do a touch version. Thank you for your sharing your videos and code.

    • @KrisKasprzak
      @KrisKasprzak  2 ปีที่แล้ว +2

      Sure, I have the ItemMenu working with touch, I will post an update in a few days when I finish the EditMenu object and do some more testing.

    • @KrisKasprzak
      @KrisKasprzak  2 ปีที่แล้ว +2

      Here you go. Just redownload this library, I've added some methods for touch screen usage. This library now serves both mechanical and touch inputs.
      This vid will demo the capability.
      th-cam.com/video/wfMcTC3_8bI/w-d-xo.html

  • @gaal8762
    @gaal8762 8 หลายเดือนก่อน

    ili9341 3.95" можно подключить ? Спасибо за проект

    • @KrisKasprzak
      @KrisKasprzak  8 หลายเดือนก่อน +1

      I've never seen this size, however if the chip is ILI9341 and your display driver uses Adafruit_GFX, it should work

  • @leehewitt9559
    @leehewitt9559 2 ปีที่แล้ว +1

    Fantastic

  • @mitmicrocontroller475
    @mitmicrocontroller475 ปีที่แล้ว

    Hi sir!! How to declare for SPI pin?

    • @KrisKasprzak
      @KrisKasprzak  ปีที่แล้ว

      that is done on the display object. you only pass the display object to the menu object

  • @abdelnacer7721
    @abdelnacer7721 2 ปีที่แล้ว

    Thank you,you didn't provide any schematic or motion the compatible device such esp32 or esp8266,hopfuly for your next video =)

    • @KrisKasprzak
      @KrisKasprzak  2 ปีที่แล้ว +1

      I figured if someone needed a menu system they are past needing to know how to get a display working. I have 2 version one for a teensy (ILI9431_t3 driver) and for MCU's that can use the Adafruit_ILI9341 driver (Arduino, and ESP's). I state this in the description.

    • @KrisKasprzak
      @KrisKasprzak  2 ปีที่แล้ว

      or watch this th-cam.com/video/XOlAo_599M4/w-d-xo.html