![](/media/cache/profiles/8fcdd9fe79de1368f11451d368c5918c.jpg.50x50_q85.jpg)
デジタルポート反転制御
main.cpp@1:d95c4085cf00, 2015-08-28 (annotated)
- Committer:
- spyglass77
- Date:
- Fri Aug 28 16:15:04 2015 +0000
- Revision:
- 1:d95c4085cf00
- Parent:
- 0:88cb63e043c1
- Child:
- 2:ea1827f0aee8
add comit
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 | 1:d95c4085cf00 | 6 | port7 = !port7; //D7 portを反転させる |
spyglass77 | 1:d95c4085cf00 | 7 | wait(0.2); // 0.2秒待つ |
spyglass77 | 0:88cb63e043c1 | 8 | } |
spyglass77 | 1:d95c4085cf00 | 9 | } |