![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
aaaaa
Dependencies: mbed Grove_LCD_RGB_Backlight
Diff: lab4b.cpp
- Revision:
- 1:d800035aa2d9
- Parent:
- 0:468c9208499f
- Child:
- 2:8bb42c039d39
--- a/lab4b.cpp Thu Aug 27 17:18:10 2020 +0000 +++ b/lab4b.cpp Thu Oct 08 17:51:31 2020 +0000 @@ -19,7 +19,7 @@ led_red=led_green=1; // turn red and green leds off for(;;) { - if(left_pb==0) // if left pb is pressed + if(left_pb==1) // if left pb is pressed { led_red=1; // red led is off wait_ms(500); @@ -27,7 +27,7 @@ wait_ms(500); } else - if(right_pb==0) // else if rigth pb is pressed + if(right_pb==1) // else if rigth pb is pressed { led_green=1; // green led is off wait_ms(500);