[Logo] TCC discussion forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 

rotary encoder setup RSS feed
Forum Index » tcMenu Arduinio library
Author Message
lololo


Joined: Apr 1, 2020
Messages: 5
Offline
Hello,

First of all thank you for adding the ssd1306ascii library. I was just waiting for the addition of this library to test tcmenu.

I don't quite understand if you have to initialize the rotary encoder in the setup? I just put the pins in tcmenu before generating the code. it works (but not very well) and the click does not work. ?!

I also wanted to know if it is possible do not display the name of the application on the screen?

and one thing that would be nice, is to be able to enter Setup mode by making a double click (which would make it possible do not display setup on the main screen and win a line)

thank you in advance for your help
davetcc


Joined: Jan 19, 2019
Messages: 362
Offline
lololo wrote:I don't quite understand if you have to initialize the rotary encoder in the setup? I just put the pins in tcmenu before generating the code. it works (but not very well) and the click does not work. ?!


There should be no additional configuration needed beyond what you've defined in the code generator. Which board are you using? Are you using long wire runs? Does the board allow for input pull up on those pins.

Ensure to start with you have interrupt_switches set to false and pull up logic set to true. Also don't forget that PIN A of the encoder has to be an interrupt capable pin, either on an IO expander or Arduino Pin. I'd start out with an Arduino pin and build from there.

lololo wrote:I also wanted to know if it is possible do not display the name of the application on the screen?


Not out of the box at the moment. Don't forget that the rendering class is nothing more than a file placed in your directory. Longer-term you could customize it, there's even a guide for that.

lololo wrote:and one thing that would be nice, is to be able to enter Setup mode by making a double click (which would make it possible do not display setup on the main screen and win a line)


You can do this, take a look at the takeOverDisplay example. It starts in a custom screen, then goes into the menu when clicked. You can essentially choose when your code or the menu code controls the screen using takeOverDisplay and giveBackDisplay. When you call "take over display", you provide a function callback that will be called several times a second to refresh the display if needed. Similar to a game loop basically. Never render to the display outside of this function.

Hope that helps,
Dave.

davetcc


Joined: Jan 19, 2019
Messages: 362
Offline
I've also just set 1.4.3 of the plugins (containing ssd1306Ascii driver) to be the standard now, so you can go back to using the STABLE release stream if you like.
 
Forum Index » tcMenu Arduinio library
Go to:   
Mobile view
Powered by JForum 2.7.0 © 2020 JForum Team • Maintained by Andowson Chang and Ulf Dittmer