Answer the question
In order to leave comments, you need to log in
Working with the clock button on the Arduino
Greetings.
I connect the button for work to the project. Used the Bounce library version 2 to prevent bounce. Here is the code:
#define BUTTON_ENTER 13
Bounce buttonEnter = Bounce();
void setup()
{
pinMode(BUTTON_ENTER, INPUT);
buttonEnter.attach(BUTTON_ENTER);
buttonEnter.interval(5);
}
void loop()
{
switch(mainMenu)
{
case(1):
break;
case(2):
break;
case(3):
display_lcd(0,0,"Ololo");
delay (1000);
lcd.clear();
mainMenu = 0;
break;
default:
if (buttonEnter.update())
{
if (buttonEnter.read() == HIGH) {
mainMenu = 3;
}
}
break;
}
}
Answer the question
In order to leave comments, you need to log in
Here is the answer to my question: www.youtube.com/watch?v=_LCCGFSMOr4
No more guessing guys!
Apparently there is an error in the diagram. You need a resistor not to D13, but to the adjacent GND.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question