hidetoshi sakamoto
/
Lesson_01_reversal
デジタルポート反転制御
main.cpp@2:ea1827f0aee8, 2015-08-28 (annotated)
- Committer:
- spyglass77
- Date:
- Fri Aug 28 17:24:51 2015 +0000
- Revision:
- 2:ea1827f0aee8
- Parent:
- 1:d95c4085cf00
add commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
spyglass77 | 0:88cb63e043c1 | 1 | #include "mbed.h" |
spyglass77 | 2:ea1827f0aee8 | 2 | //LEDを点滅させるプログラム |
spyglass77 | 0:88cb63e043c1 | 3 | //Digital port reversal. |
spyglass77 | 0:88cb63e043c1 | 4 | DigitalOut port7(D7); |
spyglass77 | 0:88cb63e043c1 | 5 | int main() { |
spyglass77 | 0:88cb63e043c1 | 6 | while(1) { |
spyglass77 | 1:d95c4085cf00 | 7 | port7 = !port7; //D7 portを反転させる |
spyglass77 | 1:d95c4085cf00 | 8 | wait(0.2); // 0.2秒待つ |
spyglass77 | 0:88cb63e043c1 | 9 | } |
spyglass77 | 1:d95c4085cf00 | 10 | } |