mbed 2 template (for smaller projects, no RTOSt)

Dependencies:   mbed

Committer:
noutram
Date:
Tue Sep 18 13:40:51 2018 +0000
Revision:
0:84f82da9789b
mbed 2 template

Who changed what in which revision?

UserRevisionLine numberNew contents of line
noutram 0:84f82da9789b 1 #include "mbed.h"
noutram 0:84f82da9789b 2
noutram 0:84f82da9789b 3 DigitalOut myled(LED1);
noutram 0:84f82da9789b 4
noutram 0:84f82da9789b 5 int main() {
noutram 0:84f82da9789b 6 while(1) {
noutram 0:84f82da9789b 7 myled = 1; // LED is ON
noutram 0:84f82da9789b 8 wait(0.2); // 200 ms
noutram 0:84f82da9789b 9 myled = 0; // LED is OFF
noutram 0:84f82da9789b 10 wait(1.0); // 1 sec
noutram 0:84f82da9789b 11 }
noutram 0:84f82da9789b 12 }