Craig Evans
/
1620_App_Board_Buttons
Button example.
Diff: main.cpp
- Revision:
- 5:0143ac4615a0
- Parent:
- 4:1676578fd4cd
--- a/main.cpp Fri Mar 02 13:40:23 2018 +0000 +++ b/main.cpp Fri Mar 02 16:21:28 2018 +0000 @@ -28,14 +28,15 @@ } else if ( button_C.read() == 1) { // check if C pressed blue_led.write(0); // if it is, turn the blue LED on } else { - // if no buttons pressed, ensure all the LEDs are off + // if no buttons pressed, ensure all the LEDs are off red_led.write(1); green_led.write(1); blue_led.write(1); } - - wait(0.1); // small delay + wait(0.1); // small delay + + } } void init_buttons()