外部割込みのサンプルプログラム

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
GGU
Date:
Tue Jul 30 04:17:11 2019 +0000
Parent:
0:8edeec4458bb
Commit message:
test

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 8edeec4458bb -r 81ed286880f5 main.cpp
--- a/main.cpp	Mon Jul 29 04:54:49 2019 +0000
+++ b/main.cpp	Tue Jul 30 04:17:11 2019 +0000
@@ -1,3 +1,4 @@
+//割込みを発生させてLEDをOFFにする
 #include "mbed.h"
 
 InterruptIn button(D12);
@@ -11,7 +12,7 @@
 int main(){
     button.rise(&flip); //立ち上がり割込み
     while(1){
-        flash = !flash; //LED is OFF
+        flash = !flash; 
         wait(0.25); //0.25sec
     }
 }
\ No newline at end of file