Тёмный

Advanced menu system with rotary encoder for Arduino/STM32 

Curious Scientist
Подписаться 38 тыс.
Просмотров 49 тыс.
50% 1

Опубликовано:

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 75   
@Hossein_Ash
@Hossein_Ash 2 года назад
You are very good with your clear programming and comments. Thank you very much. Many blessings to you.
@CuriousScientist
@CuriousScientist 2 года назад
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.
@Hossein_Ash
@Hossein_Ash 2 года назад
@@CuriousScientist I can see that, as many of the experts don't explain in the way new commers to programming can understsnd. Thanks again.
@yosemitesam8791
@yosemitesam8791 3 года назад
Just purchased an I2C LCD display so I can duplicate your setup. Many thanks!
@CuriousScientist
@CuriousScientist 3 года назад
I hope your project will be successful!
@apbosh1
@apbosh1 Год назад
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
@CuriousScientist Год назад
Enjoy! Happy to hear that it is useful to you!
@apbosh1
@apbosh1 Год назад
@@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.
@corbymodelboatclub
@corbymodelboatclub Год назад
Very interesting with nice clear instructions and programme .
@CuriousScientist
@CuriousScientist Год назад
Thank you!
@skelethornbro
@skelethornbro 2 года назад
Hi. Thanks for this great video. How to make the cursor blink instead of X when we select the menu? Or is it possible to highlight the selected menu?.
@CuriousScientist
@CuriousScientist 2 года назад
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
@paulpixzy5297
@paulpixzy5297 Год назад
Thanks for this it inspired me duo
@CuriousScientist
@CuriousScientist Год назад
Glad to hear it! Cheers!
@philippekheprisante1312
@philippekheprisante1312 Год назад
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)
@CuriousScientist
@CuriousScientist Год назад
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.
@Neverwite
@Neverwite Год назад
The lcd holders are like "⊙-⊙"
@CuriousScientist
@CuriousScientist Год назад
Look up Omnifixo, they are great stuff.
@ioTPro
@ioTPro Год назад
Very nice tutorial. Can I use this code on STM8S development board using Arduino IDE?
@CuriousScientist
@CuriousScientist Год назад
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.
@malithjayalath6417
@malithjayalath6417 2 года назад
Thank you very much learnt a lot
@CuriousScientist
@CuriousScientist 2 года назад
Great to hear that! Cheers!
@Mr.Leeroy
@Mr.Leeroy 3 года назад
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.
@CuriousScientist
@CuriousScientist 3 года назад
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?
@Mr.Leeroy
@Mr.Leeroy 3 года назад
​@@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
@CuriousScientist
@CuriousScientist 3 года назад
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!
@tybozo
@tybozo 11 месяцев назад
thanks, nice tutorial but can you go over why and how you added capacitors to the rotary encoder. does that has to do with debouncing?
@CuriousScientist
@CuriousScientist 11 месяцев назад
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.
@MarsMan2482
@MarsMan2482 3 года назад
I am going to be using something like this for a home made raspi camera
@CuriousScientist
@CuriousScientist 3 года назад
Nice! Good luck with the project!
@ben64257
@ben64257 2 года назад
what is that support for the LCD? looks cool
@CuriousScientist
@CuriousScientist 2 года назад
It is a "makers third hand" from Omnifixo. Definitely check them out, they recently released a new version (M4.2).
@robdavidowitz6428
@robdavidowitz6428 Год назад
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?
@CuriousScientist
@CuriousScientist Год назад
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.
@yuriselektro2236
@yuriselektro2236 3 года назад
👍
@CuriousScientist
@CuriousScientist 3 года назад
Cheers!
@liamferro7123
@liamferro7123 2 года назад
Good job! Helpfull video but what should i change if i use stm32cubeide to run it?
@CuriousScientist
@CuriousScientist 2 года назад
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.
@merelbrouwer9804
@merelbrouwer9804 2 года назад
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?
@CuriousScientist
@CuriousScientist 2 года назад
Hi and you're welcome! I can help with advices, but not for free. I am not a free support service.
@merelbrouwer9804
@merelbrouwer9804 2 года назад
@@CuriousScientistalright, fair enough. What is your email? That way communicating is somewhat easier
@CuriousScientist
@CuriousScientist 2 года назад
You can find my mail address on my website.
@merelbrouwer9804
@merelbrouwer9804 2 года назад
@@CuriousScientist Thanks, just sent you an email.
@sam95N
@sam95N 9 месяцев назад
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
@CuriousScientist 9 месяцев назад
Hi, Please use English.
@sam95N
@sam95N 9 месяцев назад
@@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
@gsuresh2u
@gsuresh2u 2 года назад
Hi, is there any updated version than this? I am using black pill
@CuriousScientist
@CuriousScientist 2 года назад
Hi! What do you mean by updated version?
@juliusvalentinas
@juliusvalentinas 3 года назад
How do I use the chosen values stored? How to make it do something except show values on LCD?
@CuriousScientist
@CuriousScientist 3 года назад
It depends on what you want to do.
@ipadize
@ipadize 2 года назад
how many menu pages can i have? i guess basically unlimited but i want to make sure
@CuriousScientist
@CuriousScientist 2 года назад
As much as the memory of your chosen microcontroller allows. You would probably not run out of memory easily.
@ipadize
@ipadize 2 года назад
@@CuriousScientist thanks
@coryvandergrift4079
@coryvandergrift4079 3 года назад
Link to source code is broken, otherwise great video!
@CuriousScientist
@CuriousScientist 3 года назад
Thanks for letting me know it! I fixed the link, I just did a typo. It should work now.
@viktorhugo8252
@viktorhugo8252 Год назад
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
@CuriousScientist Год назад
Yes, sure, you can fit even more variables. This is just an example that can be expanded into more complex stuff.
@viktorhugo8252
@viktorhugo8252 Год назад
@@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.
@CuriousScientist
@CuriousScientist Год назад
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...
@viktorhugo8252
@viktorhugo8252 Год назад
@@CuriousScientist , is this in the related code?
@CuriousScientist
@CuriousScientist Год назад
Download the code and see it for yourself. The code is free.
@ramakantpendke5033
@ramakantpendke5033 2 года назад
Hey I want to add submenus of string... Is it possible with this code ?
@CuriousScientist
@CuriousScientist 2 года назад
Hi! Well, if you know how to do it, yes, everything is possible. Probably a copy-paste is not enough. :)
@ramakantpendke5033
@ramakantpendke5033 2 года назад
Sure brother... I will try my best👍☺️
@himanshusharma-jt9xf
@himanshusharma-jt9xf 4 месяца назад
please share the LCD iic library
@CuriousScientist
@CuriousScientist 4 месяца назад
Hi! Download it from the library manager.
@himanshusharma-jt9xf
@himanshusharma-jt9xf 4 месяца назад
@@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.
@CuriousScientist
@CuriousScientist 4 месяца назад
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....
@ishworshrestha8361
@ishworshrestha8361 2 года назад
so you call this ADVANCED MENU SYSTEM??
@CuriousScientist
@CuriousScientist 2 года назад
Yes. Problem?
@ishworshrestha8361
@ishworshrestha8361 2 года назад
@@CuriousScientist not sure how is that even a menu system........not even coming to word advance
@CuriousScientist
@CuriousScientist 2 года назад
I am not going to argue with you. If you don't like it, don't watch it.
@ishworshrestha8361
@ishworshrestha8361 2 года назад
@@CuriousScientist oky
@alexptvz1076
@alexptvz1076 Год назад
man are you russian?
@CuriousScientist
@CuriousScientist Год назад
Nope.
Далее
Building an SZBK07-based thermostat for Peltier cooling
48:45
Blue vs Green Emoji Eating Challenge
00:33
Просмотров 2,9 млн
Уроки Arduino. Работа с энкодером
10:55
Easy and Simple Arduino Settings Menu - How to
17:17
Просмотров 43 тыс.
How to use rotary encoders
14:12
Просмотров 37 тыс.