I2C rotary encoder implemation #460
Replies: 4 comments 6 replies
-
I am trying to workout a customised input tcMenu plugins for the issue. |
Beta Was this translation helpful? Give feedback.
-
The easiest way to proceed is to use the TcMenu provided plugin for rotary encoder, it supports a vast range of I2C devices. However, if you have decided against using the built in plugin, you'll need to wire it up yourself. If this is only for yourself and not others too, do not to write a plugin. Just set input to the no input plugin, and then configure the input yourself instead. Over time I've found that the best way to proceed is to implement the RotaryEncoder interface, and then set up that rotary encoder in the same way that the input plugin does. See IoAbstraction's SwitchInput.h file. I recommend you generate a menu with the regular rotary encoder plugin and see what it generates first. But at a minimum you'll need to:
|
Beta Was this translation helpful? Give feedback.
-
Ok, the normal rotary encoder works fine. Now, I only need to have a faster response on the display when navigating through the menu. The pointer is lagging with my rotation (and misses some when I dial "too" fast. I have tried to increase the SPI rate right after gfx.begin(); to gfx.setBusClock(10000000); without any result, also tried to change hw accelation to none (HWACCEL_NONE) in tcmenu.cpp as somebody suggested, but still no change. What can I do to increase the speed? I am using ESP32 S3 and a U8G2_SSD1327_WS_128X128_F_4W_SW_SPI display. |
Beta Was this translation helpful? Give feedback.
-
Hi Dave,
After some hardware updates for my own board, I have picked up my “menu topic” again. I am struggling and wonder if you spend a couple of hours for consultancy in supporting me to get it to work?
Using :
Waveshare OLED 128x128 that is using SH1107 driver in SW SPI mode
ESP32 S3 (on a Waveshare ESP32 S3 mini board)
Adafruit SH110X library (G8U2 does not support SH1107 in SW SPI mode)
On Windows Arduino IDE I have/had it running, but slow on the response like we discussed.
Now I am fully over to Ubuntu and Platformio using JTAG pins (39,40,41 and 42) and ESP-PROG debugger/programmer.
I started on a new project. I am able to compile and upload it. But on the serial port I see the device is rebooting every second. When I create a project for showing text with just the Adafruit library that works fine.
Let me know what is possible to help me out and getting the response faster?
Enjoy the weekend!
Etienne
From: Dave Cherry ***@***.***>
Sent: Tuesday, April 16, 2024 10:25 AM
To: davetcc/tcMenu ***@***.***>
Cc: Etienne van der Kuy ***@***.***>; Author ***@***.***>
Subject: Re: [davetcc/tcMenu] I2C rotary encoder implemation (Discussion #460)
The fastest display in terms of latency to write over SPI is an OLED, it's monochrome and can handle quite high SPI speeds.
Ref encoder, agreed, that does not sound right. The only way forward is to try the IoAbstraction rotary encoder examples first and see if the same latency is noticed there. TcMenu uses IoAbstraction for all input related plugins. Following that you could also try your other library mentioned earlier and then make a call on what to do.
—
Reply to this email directly, view it on GitHub<#460 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BGWUWGSQU3LUEURJEHJAMUTY5TN47AVCNFSM6AAAAABGFOO2HKVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TCMRXGEZTK>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
Just started working with tcMenu in a ESP32 S3/SSH1107 128x128 project (and I like it very much). I run into an issue for my input device. I am using a I2C based rotary encoder by Duppa. Using their library I am using callbacks on events like increment, decrement, button pushed etc. Meaning I would like to interact with the menu from code only from within my callback functions for the encoder.
Is this possible and how should I do this?
Thx
Etienne
Beta Was this translation helpful? Give feedback.
All reactions