Hi I need help to write code for the following:
I want to press + release button 1 (to start everything), then.....
if button 2 is not pressed down then command XXXXX is done
if button 2 is pressed down then we assess button 3:
if button 3 is not pressed down then command YYYYYY is done
if button 3 is pressed down then we assess button 4: if button 4 is pressed down then we light an LED: if button 4 is not pressed down then command ZZZZZ is done
I want to use pull down resistors so that button press = logic 1. Buttons 2,3,4 will have weights sitting ontop of them. Any ideas? Thankyou!
PS My C code knowledge is limited - i've tried to improve but need help here.
I want to press + release button 1 (to start everything), then.....
if button 2 is not pressed down then command XXXXX is done
if button 2 is pressed down then we assess button 3:
if button 3 is not pressed down then command YYYYYY is done
if button 3 is pressed down then we assess button 4: if button 4 is pressed down then we light an LED: if button 4 is not pressed down then command ZZZZZ is done
I want to use pull down resistors so that button press = logic 1. Buttons 2,3,4 will have weights sitting ontop of them. Any ideas? Thankyou!
PS My C code knowledge is limited - i've tried to improve but need help here.