Takumi Okamoto
/
InterruptIn_for_arch
SeeeduinoArchで割り込みのテスト
main.cpp
- Committer:
- MrBearing
- Date:
- 2014-03-09
- Revision:
- 0:af7b276e73a7
File content as of revision 0:af7b276e73a7:
#include "mbed.h" InterruptIn button(P0_23); 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); } }