Kotachi Liu
/
HW1Q2S1
LED 1-4 light based on switch states
Revision 1:ad968bf98003, committed 2019-10-04
- Comitter:
- kotachi
- Date:
- Fri Oct 04 22:52:17 2019 +0000
- Parent:
- 0:105a5c050cb4
- Commit message:
- Working version of switch
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Sep 30 17:17:23 2019 +0000 +++ b/main.cpp Fri Oct 04 22:52:17 2019 +0000 @@ -11,12 +11,8 @@ int main() { while(1) { wait(1); - int hall; - int push; - halls.read(); - pushb.read(); - hall=!halls; - push=pushb; + int hall=!halls.read(); + int push=pushb.read(); int button=hall+push; switch(button){ case 0: