Thank you! I am trying to explain my codes as detailed as possible. Not only because other people can understand it more, but I also learn a lot by it.
This is just what I'm looking for. Need to first set a few values , then run the operations with those set values. Perfect. I might go a step further and save them in eeprom. Thanks 😊
@@CuriousScientist yes. I've seen more advanced code for menu systems but that's no good to me. I like this approach for what I'm doing, I can follow it properly.
Hi! Both are a bit more complicated. Blinking the cursor would mean that you would need to draw and erase a cursor with some timing. It is doable, but in my opinion, it doesn't worth the mess. Highlighting is also possible. I don't exactly know if this specific display and the corresponding libraries can do it, but I did it with other displays in the following way: The unselected item is printed with the default letter colour (in this case, black), then when I move on the item, first I draw a black rectangle over the area of the text, then I print a white text over this rectangle. Then, when I unselect/navigate away from the item, print a white rectangle over the previous area and reprint the original text in black. It is a lot of coding and you have to carefully keep track of the position on the menu, you have to implement navigation in both directions...etc. I implemented a very similar strategy for my soldering station: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-9xac7aseDws.html
Hello, looks great but I think that for me, something is missing a menu entry to save and exit ( validate entries and pass values to main program) How can you do that (Sorry, I am an arduino beginner)
Hi! Check my newer videos. I have many videos where I built menu systems and I implemented similar things that you require. For example, my reflow hot plate project definitely has this feature. Or the 10-channel temperature logger project.
Thanks! If the specified board is available in the boards (which means it is supported by the stm32duino framework) l, then sure you can use it. Just make sure you follow the pin definitions according to the STM328S MCU.
I know it works, but it is a bad practice to have unnecessary code in interrupt routines. You should not have handled program logic inside, but simply detect states, set flags. And it would solve the issue with updating cursor, as you could still have had old position, erase it first, then based on a flag set the new one.
All I did in the interrupts are increasing/decreasing a value and changing a boolean's state. Where do you exactly see the bad practice? How would you implement it correctly then?
@@CuriousScientist only detect rotation event and direction. comparisons as everything else take up mcu core time and it will bite you in a more complex project with sensitive timings. Let Ben Buxton show you how. In in your example with his lib even polling would suffice and you won't notice that interrupts are not used: github.com/buxtronix/arduino/tree/master/libraries/Rotary
Thanks, I will look this up and will try to adapt it for more complex codes. Luckily, I don't have time critical codes yet, so the technique I use works just fine. But, yes, if there's a way to improve, then let's improve!
Hi! I soldered them to the circuit. And yes, it has something to do with the debouncing. The internet is full of literature on debouncing, use the Google.
This is an excellent tutorial and would be absolutely perfect if I got it to work. On an Arduino UNO, 16*2 LCD, I am trying to achieve working with a rotary encoder with built in switch but absolutely nothing that I do can get the Menu > to change to X Can I please send you my circuit diagram and sketch for you to have a look at and see where I am going wrong?
Hi! The tutorial has nothing wrong as you can see it in the video. I published the same (or further improved and tested) code and schematics on my page. They should work perfectly if you followed my tutorial well. I am sorry but I don't have the free time to accept such assignments for free. However, you can hire me and then we can consult about the issues. Email address is on my website.
Thank you. Basically the whole code has to be changed. This is written for Arduino. CubeIDE uses a different framework (HAL) and has a totally different way of dealing with the things.
Hi there, thanks alot for the explanation and code. I'm working on a school project and i need to make a menu to hold 5 different codes. It also doesn't use a rotary encoder but a slide potmeter. I'm very new to coding in general and was wondering if you could help me with some stuff?
Bonjour Monsieur. J'ai utilisé et adapté votre code pour réaliser une télécommande à distance avec un module nrf24l01. J'arrive bien à faire varier à distance mes les. Par co tre j'aimerais que le changement d'État ou de luminosité ne soit pas instantané mais se valide uniquement quand on sort du 'menu de réglage'. En gros que la valeur ON, OFF, Blink, ou PWM ne soit prise en compte que quand on retourne avec un curseur flèche. Pourriez vous m'orienter car je suis débutant et ne trouve pas comment résoudre ce problème. Merci Samuel
@@CuriousScientist sorry you Can delete my comment it is a mistake. I was writing a comment on another video and youtube automatically switched to your vidéo just before I sent my comment. Thanks for your tuto
Can this fit for 10 variables / Menü 1-10 and scaling up and down the rows? 4 variables are not so much. I thing the values have to save in 1 EEPROM byte if you leave the configuration.
@@CuriousScientist , how can you scroll through the menus if you have 10 and only 4 rows? Did you display 4 rows of 10 for the variables and change the sites 1-4 , 5-8 and 9-10 ? Please explain the possibility.
Yes, I would display the first four items and then the next encoder click would shift out the first row and shift in the fifth. So the display would show 2-3-4-5 lines. And so on...
@@CuriousScientist there are many libraries. I have tried them but, receiving errors. please name the library for display. it also showing error for pushButton in inturrupt.
This is the github link for the library if I remember correctly: github.com/johnrickman/LiquidCrystal_I2C I don't know what kind of error you get, so I cannot advise on that issue....