hidetoshi sakamoto
/
Lesson_01_reversal
デジタルポート反転制御
main.cpp@0:88cb63e043c1, 2015-08-24 (annotated)
- Committer:
- spyglass77
- Date:
- Mon Aug 24 07:42:12 2015 +0000
- Revision:
- 0:88cb63e043c1
- Child:
- 1:d95c4085cf00
exsample_00_reversal
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
spyglass77 | 0:88cb63e043c1 | 1 | #include "mbed.h" |
spyglass77 | 0:88cb63e043c1 | 2 | //Digital port reversal. |
spyglass77 | 0:88cb63e043c1 | 3 | DigitalOut port7(D7); |
spyglass77 | 0:88cb63e043c1 | 4 | int main() { |
spyglass77 | 0:88cb63e043c1 | 5 | while(1) { |
spyglass77 | 0:88cb63e043c1 | 6 | port7 = !port7; //D7 port |
spyglass77 | 0:88cb63e043c1 | 7 | wait(0.2); // 200 ms |
spyglass77 | 0:88cb63e043c1 | 8 | } |
spyglass77 | 0:88cb63e043c1 | 9 | } |