mbed-os Hello World!

Committer:
tuthai
Date:
Wed Aug 02 09:56:51 2017 +0000
Revision:
0:0e8f7d5af1f2
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tuthai 0:0e8f7d5af1f2 1 #include "mbed.h"
tuthai 0:0e8f7d5af1f2 2
tuthai 0:0e8f7d5af1f2 3 DigitalOut led1(LED1);
tuthai 0:0e8f7d5af1f2 4
tuthai 0:0e8f7d5af1f2 5 // main() runs in its own thread in the OS
tuthai 0:0e8f7d5af1f2 6 int main() {
tuthai 0:0e8f7d5af1f2 7 while (true) {
tuthai 0:0e8f7d5af1f2 8 led1 = !led1;
tuthai 0:0e8f7d5af1f2 9 wait(0.5);
tuthai 0:0e8f7d5af1f2 10 }
tuthai 0:0e8f7d5af1f2 11 }
tuthai 0:0e8f7d5af1f2 12