hidetoshi sakamoto
/
Lesson_01_reversal
デジタルポート反転制御
Diff: main.cpp
- Revision:
- 0:88cb63e043c1
- Child:
- 1:d95c4085cf00
diff -r 000000000000 -r 88cb63e043c1 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Aug 24 07:42:12 2015 +0000 @@ -0,0 +1,9 @@ +#include "mbed.h" +//Digital port reversal. +DigitalOut port7(D7); +int main() { + while(1) { + port7 = !port7; //D7 port + wait(0.2); // 200 ms + } +}