Hello World example for the VBLUno51 board to blink status Led.
Dependencies: mbed
main.cpp@0:77d2a9f55452, 2017-10-13 (annotated)
- Committer:
- vbluno_support
- Date:
- Fri Oct 13 00:42:23 2017 +0000
- Revision:
- 0:77d2a9f55452
- Child:
- 1:c2b455e4df31
Add code
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
vbluno_support | 0:77d2a9f55452 | 1 | #include "mbed.h" |
vbluno_support | 0:77d2a9f55452 | 2 | |
vbluno_support | 0:77d2a9f55452 | 3 | /*For the VBLUno51 board*/ |
vbluno_support | 0:77d2a9f55452 | 4 | #define PIN_LED p7 |
vbluno_support | 0:77d2a9f55452 | 5 | |
vbluno_support | 0:77d2a9f55452 | 6 | DigitalOut led(PIN_LED); |
vbluno_support | 0:77d2a9f55452 | 7 | |
vbluno_support | 0:77d2a9f55452 | 8 | int main(void) { |
vbluno_support | 0:77d2a9f55452 | 9 | |
vbluno_support | 0:77d2a9f55452 | 10 | //No condition loop |
vbluno_support | 0:77d2a9f55452 | 11 | while(1) { |
vbluno_support | 0:77d2a9f55452 | 12 | led = 1; |
vbluno_support | 0:77d2a9f55452 | 13 | wait(0.2); |
vbluno_support | 0:77d2a9f55452 | 14 | led = 0; |
vbluno_support | 0:77d2a9f55452 | 15 | wait(0.2); |
vbluno_support | 0:77d2a9f55452 | 16 | } |
vbluno_support | 0:77d2a9f55452 | 17 | } |