Junichi Katsu
/
TickerTest
mbed電子工作レシピ リスト4.1のプログラム
Diff: main.cpp
- Revision:
- 0:ff2497eea45b
diff -r 000000000000 -r ff2497eea45b main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Dec 23 15:33:14 2015 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" + +Ticker flipper; +DigitalOut myled(LED1); + +void flip() { + + myled = !myled; + +} + +int main() { + flipper.attach(&flip, 0.2); + + while(1) { + } +}