![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
mX mbed BaseBoard Ext. Int.
main.cpp
- Committer:
- ashwin_athani
- Date:
- 2010-12-08
- Revision:
- 0:09eedb45b600
File content as of revision 0:09eedb45b600:
#include "mbed.h" InterruptIn button(p11); DigitalOut led(LED1); DigitalOut flash(LED4); void flip() { led = !led; } int main() { button.rise(&flip); // attach the address of the flip function to the rising edge while(1) { // wait around, interrupts will interrupt this! flash = !flash; wait(0.25); } }