3.2.2
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:8ec06ed0e9b0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Sep 12 11:34:24 2017 +0000 @@ -0,0 +1,20 @@ +#include "mbed.h" + +DigitalOut myled(LED1); +Serial pc(USBTX, USBRX); +int x = 0; +int pulser; +int main() +{ + while(1) { + pc.printf("Skriv inn antall pulser: "); + pc.scanf("%d", &pulser); + for(x = 0; x < pulser; x++) { + myled = 1; + wait_ms(500); + myled = 0; + wait_ms(500); + + } + } +}