![](/media/cache/group/etherplug2.png.50x50_q85.png)
Hello world program (step 0) for the nRF51 and nRF52 developer kits used in the IoT Empire research workshop.
main.cpp@0:e7d3031b16e3, 2017-03-28 (annotated)
- Committer:
- Michael Schloh von Bennewitz
- Date:
- Tue Mar 28 16:29:44 2017 +0200
- Revision:
- 0:e7d3031b16e3
- Child:
- 1:3ce7d0b39f17
Initialised project and added LED output logic.
Who changed what in which revision?
User | Revision | Line number | New 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); |
Michael Schloh von Bennewitz |
0:e7d3031b16e3 | 4 | |
Michael Schloh von Bennewitz |
0:e7d3031b16e3 | 5 | // main() runs in its own thread in the OS |
Michael Schloh von Bennewitz |
0:e7d3031b16e3 | 6 | int main() { |
Michael Schloh von Bennewitz |
0:e7d3031b16e3 | 7 | while (true) { |
Michael Schloh von Bennewitz |
0:e7d3031b16e3 | 8 | Led1 = !Led1; |
Michael Schloh von Bennewitz |
0:e7d3031b16e3 | 9 | wait(0.25); |
Michael Schloh von Bennewitz |
0:e7d3031b16e3 | 10 | } |
Michael Schloh von Bennewitz |
0:e7d3031b16e3 | 11 | } |