Easy and Simple Arduino Settings Menu - How to

Поділитися
Вставка
  • Опубліковано 16 вер 2024

КОМЕНТАРІ • 60

  • @driesdewulf9290
    @driesdewulf9290 5 місяців тому +1

    I Will post something when eveything is in shape. Thanks for your channel and support

  • @kellyspoolhall761
    @kellyspoolhall761 4 місяці тому +1

    Good video 👍 One suggestion I could offer if I may... I have built a similar menu for my garden hydrant controller. I noticed on yours that the display flickers every time you change the values in each submenu. To smooth that out, avoid clearing the LCD for those updates. You only need to reprint the value that changes instead of the entire submenu text. Cheers!

    • @TasteTheCode
      @TasteTheCode  4 місяці тому

      Cool, thanks! I've done that on some projects but it requires that there is some static text on the screen.

  • @Dalton0521
    @Dalton0521 Рік тому +1

    Super helpful video to get started. Thanks so much!

  • @driesdewulf9290
    @driesdewulf9290 5 місяців тому

    Ok I Will test your suggestion. Thanks

  • @garthlee8166
    @garthlee8166 3 роки тому +1

    many thanks sharing learning as I go

  • @KW-ei3pi
    @KW-ei3pi Рік тому +1

    Nicely done. Thank you

  • @driesdewulf9290
    @driesdewulf9290 5 місяців тому

    I am curious about the pelllet burner project of yours so I can use Some bits of code for my own project 😁

    • @TasteTheCode
      @TasteTheCode  5 місяців тому +1

      Sure, go for it! Unfortunately, there is no update since that video as there wasn't much interest in continuing it and I did not had the time. However, everything is published as open source so feel free to reuse whatever you need. If you end up building something with it, I'd like to see it. 👍

  • @rangerocket9453
    @rangerocket9453 Рік тому

    Hello, I watched your video and I copied and pasted the code and removed the time part, Yet still it doesn't work...
    *Error: 'triggerMenu' was not declared in this scope*
    and a whole lot of other errors...

    • @TasteTheCode
      @TasteTheCode  Рік тому

      Well I guess you either deleted too much or deleted the wrong part of the code. In my code the void triggerMenu() fuction is provided and needed for it to work. If you removed it, then you also need to remove the places where it is called but then again, you need to know what you are modifying and why.

  • @driesdewulf9290
    @driesdewulf9290 5 місяців тому

    Hi. Thanks for this very useful tutorial. I have a question for you: is it possible to set more than one parameter per screen? Thanks and greetings

    • @TasteTheCode
      @TasteTheCode  5 місяців тому +1

      Hi, thanks for watching! Yes, you can have multiple parameter arrays and set more than one thing at a time. You will however need to figure out hot to display these and also how to know which one you alter.

    • @driesdewulf9290
      @driesdewulf9290 5 місяців тому

      That Will be a challange

    • @TasteTheCode
      @TasteTheCode  5 місяців тому

      Any particular reason why you want more than 1 per screen? The display is not that big for more data display.

    • @driesdewulf9290
      @driesdewulf9290 5 місяців тому

      I am working on an aquariumcontroller with time based settings and I want to set parameters for time hout minutes per screen. I have it working now with you menu template and I was wondering of this was possible.

    • @TasteTheCode
      @TasteTheCode  5 місяців тому

      Maybe you can still have separate screens but you can instead show the entire time settings with hours, minutes and seconds? This way it might look as if they are edited on one screen and the set edited can maybe be displayed in negative with black background and white numbers. Just an idea.

  • @robpardee
    @robpardee 2 роки тому

    Nice rework of the code by Vladamir, I started there too but I am stuck. Do you happen to go over how to turn that menu into a working count down timer for example? I've gotten far enough to have a menu work with selections, I just can't figure out how to make those selections execute a function (a countdown timer in my case) I admit, I'm new to arduino and trying to learn so this is difficult right now for me and I couldn't tell if your other videos covered this exactly.

    • @TasteTheCode
      @TasteTheCode  2 роки тому

      Hey Rob, I don't have the exact requested example but you can act on whatever value was set in the parameters array. Inside the main function, once the menu is closed, you can check a parameter, and if it is greater than 0, you can start the countdown to 0. Once it reaches 0, the countdown will be stopped and you can return to the previous state. I hope that I can soon release the code for my pellet burner project where this menu is used, but it needs some more work. That should hopefully make it easier.

  • @jakkokok7491
    @jakkokok7491 11 місяців тому

    What libraries do you use? Maybe a link will help? Thank you

    • @TasteTheCode
      @TasteTheCode  10 місяців тому

      github.com/Makuna/Rtc for the RTC and www.pjrc.com/teensy/td_libs_Encoder.html for the Encoder. The rest are default ones from Arduino I think.

  • @otto47456
    @otto47456 11 місяців тому

    i cannot get this to run on a ESP32. It just goes into continuous reset

    • @TasteTheCode
      @TasteTheCode  11 місяців тому

      I haven't tried it on an ESP32 so I can't tell for sure what might be the issue but I can suggest to look at libraries and make sure they are compatible with it.

  • @altaibskt1
    @altaibskt1 2 роки тому

    Thanks for the Video. I copied the code and remove the time part from it. However, My encoder reads in the minus, and each click = 2 positions. when I turn the encoder the position reads only even numbers -2,-4,-6. can you advise please

    • @TasteTheCode
      @TasteTheCode  2 роки тому +1

      Each positive stop on the encoder is actually two positions moved. Thus the 2 positions increase. For the negative increase, I think that you may have mixed the clock and data wires. Try reversing rhem in the code.

    • @altaibskt1
      @altaibskt1 2 роки тому

      @@TasteTheCode thanks, I had them mixed. I corrected it but the position still counter 2 4 6 in both sides

    • @TasteTheCode
      @TasteTheCode  2 роки тому

      You can account for that in the code. Just divide by two.

  • @paulpixzy5297
    @paulpixzy5297 2 роки тому

    How can I use three push for this project instead of rotrary encoder advice me on just three push button

    • @TasteTheCode
      @TasteTheCode  2 роки тому

      You will need to update the code to react on the buttons instead of the encoder.

    • @paulpixzy5297
      @paulpixzy5297 2 роки тому

      @@TasteTheCode thanks for that ...i need it to control my inverter project

  • @TakamiWoodshop
    @TakamiWoodshop 3 роки тому

    Nice one as always Bill. I notice you always use that stock IDE, do you ever use one of the alternatives to get more of a traditional C++ experience? In my one or two minor arduino projects I've done it was the first thing I did, that standard one drives me nuts. Not even sure if it supports OO, it's plain C isn't it? (I guess not cos C doesn't have string.)

    • @TasteTheCode
      @TasteTheCode  3 роки тому +3

      I use VSCode in my daily work but it does not feel right with Arduino :D The stock IDE is more of a personal thing and basically something that I'm used to. However it does lack some features like code navigation for example. OO is supported but really used outside of libraries and the language is not pure C++ but a subset of it that is focused on reducing program size and RAM usage.
      At the end of the day, its the projects that matter and the IDE is just a tool for getting it done. In some cases you may work with a special, one of a kind hammer, but most of the time, any hammer will do 😁

    • @TakamiWoodshop
      @TakamiWoodshop 3 роки тому +1

      @@TasteTheCode VSCode, I haven't tried that, I used visual studio for many years but ... Not the same thing are they? I've been using only Eclipse and Jetbrains for the last 7 years. As you say, it's the project, not the hammer.

    • @TasteTheCode
      @TasteTheCode  3 роки тому +1

      No they are different.

    • @nelsonahlvik6650
      @nelsonahlvik6650 Рік тому

      Arduino uses CPP11. You can do OO. The String library is a custom implementation however

  • @faturahmanf3024
    @faturahmanf3024 2 роки тому

    Can you help me again, recently my rotary encoder having a problem that when i connecting my arduino to rotary encoder using a long cable, this cable about 2 meters long. from your code that i use, to get into the menu i have to press the button of the encoder right? , So when i use this long cable, sometimes even if i'm not press any button or rotate the encoder, the menu was just moving, and i think its malfunctioning that when i just rotate it randomly the display get in to the menu. Also i already check my encoder voltage just fine in 5V. But if i use a short cable about 20 cm long, its working just fine, do you have any advice for my encoder, please help

    • @TasteTheCode
      @TasteTheCode  2 роки тому

      I've never used an encoder with such long cable. Have you checked if maybe on the long cable some of the wires are mixed up? If so it is possible that turning is then interpreted as switch press. Other thing might be the capacitance of the cable or it acting as an antenna. Try using some twisted pair cable to see if it makes any difference.

    • @faturahmanf3024
      @faturahmanf3024 2 роки тому

      @@TasteTheCode thank you for your help, i found the problem, the problem was the encoder make a bounce when i rotate the rotary encoder, and that bounce make my arduino thought that it was a push, so i have to adding a debounce programs to the code

    • @TasteTheCode
      @TasteTheCode  2 роки тому

      Yes, debouncing is a must. I'm glad you figured it out!

  • @ALLINONE-ec9jq
    @ALLINONE-ec9jq 3 роки тому

    can tou healp me write code esp32 for solar charger controler

    • @TasteTheCode
      @TasteTheCode  3 роки тому

      check this video ua-cam.com/video/ShXNJM6uHLM/v-deo.html&ab_channel=TechBuilder

  • @acestu
    @acestu 2 роки тому

    Hi, does anyone know which I2c Lcd Library is used please ?

    • @TasteTheCode
      @TasteTheCode  2 роки тому

      It is the official Arduino library. www.arduino.cc/reference/en/libraries/liquidcrystal-i2c/

    • @acestu
      @acestu 2 роки тому +1

      @@TasteTheCode Thanks for the info

    • @TasteTheCode
      @TasteTheCode  2 роки тому

      You are welcome!

  • @faturahmanf3024
    @faturahmanf3024 2 роки тому

    How to change the parameter or value of each menu option?, i want to change the parameter of menu option to a 100 value? Please help

    • @TasteTheCode
      @TasteTheCode  2 роки тому

      Do you mean as defaults? You can extend the array to have more than two items for each of the settings where the defaults will be stored, something like {"Ignition time", "Minutes", "18"}. Then you can have a call in the setup, where it will init the parameters with this value. for (int i = 0; i < numOfScreens; i++) {
      parameters[i] = (int) screens[i][2].toInt();
      }

    • @faturahmanf3024
      @faturahmanf3024 2 роки тому

      I mean , i want to change the rotary encoder value to 100 or any value on a certain menu, so for example in setting 1, i rotate the rotary encoder to change its value increases starting from 0, 100, 200, etc.., and then on setting 2 the values start from 0,1,2, etc.

    • @TasteTheCode
      @TasteTheCode  2 роки тому +1

      @@faturahmanf3024 in the encoder handling function, you will need to add a check to see in which menu you are and then increase the value accordingly.

    • @faturahmanf3024
      @faturahmanf3024 2 роки тому

      @@TasteTheCode okey, thank you for the advice, i will try it 👍

    • @faturahmanf3024
      @faturahmanf3024 2 роки тому

      Sory to bother you sir, i want to ask again, How are programs for the encoder if we want the encoder value starts from certain value, for the example i want my encoder to count start from 0, 500, 800, etc., Currently i use your code sir, i see that on void loop part "if(NewPosition>oldPosition){
      Parameters[currentscreen]++; "
      I see that the function for "Parameters[currentscreen]++" to increase the value of setting screen 1, but its only increase the value 0,1,2 etc. How if i want to change the increase value to 0,500,800 etc