mbed workshop intro + cansat examples
Diff: Interrupt.cpp
- Revision:
- 0:f309f06aeec7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Interrupt.cpp Thu May 10 21:14:34 2012 +0000 @@ -0,0 +1,13 @@ +#include "mbed.h" + +DigitalOut myled(p5); +InterruptIn switchEvent(p8); + +void switchPressed() { + myled = !myled; +} + +int main() { + switchEvent.rise(switchPressed); + wait(60); +} \ No newline at end of file