
BusIn and BusOut
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:619fe21b6bc5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Oct 15 15:50:55 2015 +0000 @@ -0,0 +1,27 @@ +#include "mbed.h" + +//Define leds +BusOut leds(D8,D9,D10,D11,D12,D13,D4,D5); + +//Define Switches +BusIn buttons(A0,A1,A2,A3,A4,A5,D2,D3); + + + +int main() { + + int antallBlink = 0; + + while (true) + { + printf("Skriv inn hvor mange ganger lysdiodene skal blinke:\r\n"); + scanf ("%d",&antallBlink); + for(int i=0; i<antallBlink; i++){ + leds=0x00; + wait_ms(200); + leds=0xFF; + wait_ms(200); + + } + } +} \ No newline at end of file