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

main.cpp

Committer:
michaesc
Date:
2017-03-28
Revision:
2:ab1ed6092e6d
Parent:
1:3ce7d0b39f17

File content as of revision 2:ab1ed6092e6d:

#include "mbed.h"

DigitalOut Led1(LED1);
DigitalOut Led2(LED2);
DigitalOut Led3(LED3);
DigitalOut Led4(LED4);

// main() runs in its own thread in the OS
int main() {
    while (true) {
        Led1 = !Led1;
        wait(0.25);
        Led2 = !Led2;
        wait(0.25);
        Led4 = !Led4;
        wait(0.25);
        Led3 = !Led3;
        wait(0.25);
    }
}