HMMM, how i can write same ? mean 2 bush button and out case leds 1-5 ?
start led 1 high
button1 led only up, led2 high all other low
i understand case row, case1 led1 hight,led2low,led3low etc,
but how make buttons and how read what is led state,and read led state button up or down move state new led.
mena state is 3 up button move state 4 or down button move state and led 2
i read and read but no understand switch case,array or what i must use?
loop and how mark state to memory were read state and then bush button and move led up or down and write state to memory again ?
Buttons have A1 and A2 const int input
leds have D3,4,5,6,7 const int output
int have buttonstate=0
int lastbuttonstate=0 (one examples copy,i try and try but no understand.
and no understand if buttonstate !=lastbuttonstate ???????
buttonstate=digitalread A1 or A2 button
but how jump to case ???? if buttonstate change up or down ???
or how make thats output binary ? start leds have 1,0,0,0,0,
and if button down nothing and button up leds have 0,1,0,0,0
next up have 0,0,1,0,0
next up have 0,0,0,1,0
next up have 0,0,0,0,1
and lastbutton remember state alltime change up or down etc, 2 and button up change 3 or Button down change 1 etc.
sorry my write,but no understand,read and read lot but no all my test working