lexus2k / ssd1306

Driver for SSD1306, SSD1331, SSD1351, IL9163, ILI9341, ST7735, PCD8544, Nokia 5110 displays running on Arduino/ESP32/Linux (Rasperry) platforms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Controlling menu item and submenu with Rotary Encoder KY-040

edmonf opened this issue · comments

dear friend
i used your library ssd1306.h latest release, i really love it, small Flash size and SRAM used with arduino pro mini, i use 0'96 oled ssd1306 and Rotary Encoder KY-040 for select menu item and scroll menu item, i read ssd1306_menu.c and Nano Engine Inputs object, its only input for button not for rotary encoder so i had a trouble to scroll up and down with rotary encoder, would you update Nano Engine Inputs object for rotary encoder, i think it will be great custom input.
i learn from:
http://exploreembedded.com/wiki/index.php?title=Interactive_Menus_for_your_project_with_a_Display_and_an_Encoder

sorry for my english and my request, because your ssd1306 library is the powerfull for my oled display project

Hello,
Thank you for reporting the issue. I will check and let you know what can be done.

I don't have rotary encoder by hand. So, please check my commit d5eaf29. I added some support, but without any testing.
Also, as mentioned in many sources, the best way to process signals from KY40 is to attach interrupt. Unfortunately, ssd1306 library is high level cross-platform library, and it is impossible to write down code for interrupts, which will work on many platforms.
Let me know if connectKY40encoder() code works. Also, if you need to use interrupts, you may refer to connectCustomKeys() api to use your function.

ok, thanks for your reply,
yes i use attached interrupt for my rotary encoder project, i'll try with mode interrupt or polling or timing,
i'll be report asap

Hello, do you have any updates?

Did you have a chance to check newly added API?

I'm closing the issue, since no any feedback and no opportunity to check it.
API is removed from doxygen documentation.

sorry for late feedback, i had test and no luck with api so i decide to choose another library to control menu and work perfectly, can i post my project demo here?

Hello,

sure, you can