Hi everyone,
not understand, how to enter and fix state the value_1 in setting mode,
have two button_B_1 and button_B_2, value_1,
if button_B_1 is pressed more than 2 seconds,
switch go to setting mode value_1,
next - value_1 setting mode,
when you press the button_B_1 , the value_1 goes up,
when the button_B_2 is pressed down, the value_1 goes down
exit the setting mode,
go to main mode
for example, I press button_B_1 and enters in setting mode value_1,
but if I stop pressing the button_B_1, everything immediately switches to the main mode,
How do I fix the state setting mode value_1 up, down?
thnx
I think that can't do without a millis timer,
and some other flag or boolean variable needs to be added,
I suppose need to make the button poll permanent,
Long press of the left button activates mode_1
Long press of the right button activates mode_2
If mode_1 is active, a timer is started for two seconds to poll if there any actions,
or try to set the timing 2 seconds for mode_1,
if mode 1 is active,
Short press of the left button, the value_1 is incremented,
Short press of the right button decreases the value_1,
exit from the mode_1 by time or inactivity,
with mode_2, too alls, only there is an increment or decrement of value_2,
for me the main difficulty now is to start mode_1 with a long left-click,
and then use the same left button to increment with a short press,
thanks