デジタルポート反転制御

Dependencies:   mbed

main.cpp

Committer:
spyglass77
Date:
2015-08-28
Revision:
1:d95c4085cf00
Parent:
0:88cb63e043c1
Child:
2:ea1827f0aee8

File content as of revision 1:d95c4085cf00:

#include "mbed.h"
//Digital port reversal.
DigitalOut port7(D7);
int main() {
    while(1) {
        port7 = !port7; //D7 portを反転させる
        wait(0.2); // 0.2秒待つ
    }
}