Hello world program (step 0) for the nRF51 and nRF52 developer kits used in the IoT Empire research workshop.

Committer:
michaesc
Date:
Tue Mar 28 14:32:15 2017 +0000
Revision:
1:3ce7d0b39f17
Parent:
0:e7d3031b16e3
Developed endless looping LED output block.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Michael Schloh von Bennewitz 0:e7d3031b16e3 1 #include "mbed.h"
Michael Schloh von Bennewitz 0:e7d3031b16e3 2
Michael Schloh von Bennewitz 0:e7d3031b16e3 3 DigitalOut Led1(LED1);
michaesc 1:3ce7d0b39f17 4 DigitalOut Led2(LED2);
michaesc 1:3ce7d0b39f17 5 DigitalOut Led3(LED3);
michaesc 1:3ce7d0b39f17 6 DigitalOut Led4(LED4);
Michael Schloh von Bennewitz 0:e7d3031b16e3 7
Michael Schloh von Bennewitz 0:e7d3031b16e3 8 // main() runs in its own thread in the OS
Michael Schloh von Bennewitz 0:e7d3031b16e3 9 int main() {
Michael Schloh von Bennewitz 0:e7d3031b16e3 10 while (true) {
Michael Schloh von Bennewitz 0:e7d3031b16e3 11 Led1 = !Led1;
Michael Schloh von Bennewitz 0:e7d3031b16e3 12 wait(0.25);
michaesc 1:3ce7d0b39f17 13 Led2 = !Led2;
michaesc 1:3ce7d0b39f17 14 wait(0.25);
michaesc 1:3ce7d0b39f17 15 Led4 = !Led4;
michaesc 1:3ce7d0b39f17 16 wait(0.25);
michaesc 1:3ce7d0b39f17 17 Led3 = !Led3;
michaesc 1:3ce7d0b39f17 18 wait(0.25);
Michael Schloh von Bennewitz 0:e7d3031b16e3 19 }
michaesc 1:3ce7d0b39f17 20 }