Creating a CoxBox with the mbed
Dependencies: mbed C12832 SMARTGPU2
Diff: timer.cpp
- Revision:
- 8:ae9f6033daa0
- Parent:
- 1:76f0ae2f909f
- Child:
- 9:f49dfeb4d3d5
--- a/timer.cpp Sun May 04 19:21:45 2014 +0000 +++ b/timer.cpp Sun May 04 20:39:32 2014 +0000 @@ -4,7 +4,7 @@ Timer t; int count; int actualCount; - float time; +// float time; DigitalOut myled(LED1); DigitalOut myled2(LED2); InterruptIn Hallsensor(p14); @@ -17,28 +17,28 @@ } count++; } -int main() { - while(button){ - - Hallsensor.rise(&pulses); - - t.reset(); - t.start(); - - - - - } - if(!button){ - - t.stop(); - - actualCount=count/2; - time= t.read()/actualCount; - - } - - - - } +//int main() { +// while(button){ +// +// Hallsensor.rise(&pulses); +// +// t.reset(); +// t.start(); +// +// +// +// +// } +// if(!button){ +// +// t.stop(); +// +// actualCount=count/2; +// time= t.read()/actualCount; +// +// } +// +// +// +// } \ No newline at end of file