Mechatronics example program

Dependencies:   mbed

main.cpp

Committer:
ykuroda
Date:
2017-10-05
Revision:
1:e450b69e093a
Parent:
0:fbfdf477cfd1

File content as of revision 1:e450b69e093a:

#include "mbed.h"

DigitalOut myled(LED1);
DigitalIn d0(D0);

int main() {
    while(1) {
        myled = ~myled; // LED is toggled

        printf("D[%1d]\n",d0.read());
    }
}