a
Dependencies: mbed
main.cpp
- Committer:
- fkgjh
- Date:
- 2015-12-08
- Revision:
- 0:c273f903edbc
File content as of revision 0:c273f903edbc:
#include "mbed.h" BusOut Leds(PA_9, PC_7, PB_6, PA_7, PA_6, PA_5, PB_5, PB_4); DigitalIn SW7(PB_3); DigitalIn SW6(PA_10); int main() { int teller=0; Leds=~teller; while(true) { if(SW7==0) { teller=teller+1; Leds =~ teller; wait_ms(2); while(SW7==0) { wait_ms(1); } } if(SW6==0) { teller=teller-1; Leds =~ teller; wait_ms(2); while(SW6==0) { wait_ms(1); } } } }