motogymkhana timer

Dependencies:   mbed

Committer:
okazbb
Date:
Fri Jan 08 02:38:09 2016 +0000
Revision:
0:ae2d990144a8
?????????????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
okazbb 0:ae2d990144a8 1 #include "mbed.h"
okazbb 0:ae2d990144a8 2
okazbb 0:ae2d990144a8 3 DigitalIn start_switch(PB_8);
okazbb 0:ae2d990144a8 4 DigitalOut watch_switch(PA_7);
okazbb 0:ae2d990144a8 5 DigitalOut led(LED1);
okazbb 0:ae2d990144a8 6
okazbb 0:ae2d990144a8 7 int main() {
okazbb 0:ae2d990144a8 8
okazbb 0:ae2d990144a8 9 while(1) {
okazbb 0:ae2d990144a8 10 if(start_switch == 1){
okazbb 0:ae2d990144a8 11 watch_switch = 1;
okazbb 0:ae2d990144a8 12 wait(2.0);
okazbb 0:ae2d990144a8 13 watch_switch = 0;
okazbb 0:ae2d990144a8 14 }
okazbb 0:ae2d990144a8 15 wait(0.001);
okazbb 0:ae2d990144a8 16 }
okazbb 0:ae2d990144a8 17 }