Library to show error code with MBED leds. Decimal error code 1-15 can be set
This library can show Your error code (integer 1-15) on MBED Leds.
main.cpp@0:3e7de538b366, 2012-09-05 (annotated)
- Committer:
- eqon
- Date:
- Wed Sep 05 06:16:31 2012 +0000
- Revision:
- 0:3e7de538b366
First release
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
eqon | 0:3e7de538b366 | 1 | #include "mbed.h" |
eqon | 0:3e7de538b366 | 2 | #include "LEDout.h" |
eqon | 0:3e7de538b366 | 3 | |
eqon | 0:3e7de538b366 | 4 | |
eqon | 0:3e7de538b366 | 5 | int main() |
eqon | 0:3e7de538b366 | 6 | { |
eqon | 0:3e7de538b366 | 7 | LEDout led; |
eqon | 0:3e7de538b366 | 8 | |
eqon | 0:3e7de538b366 | 9 | led.blink(15,20);//Blink code 15, 20times, //noblocking, so code can continue |
eqon | 0:3e7de538b366 | 10 | for(int k=0; k<10; k++){ |
eqon | 0:3e7de538b366 | 11 | printf("printing while blinking ;) \n"); |
eqon | 0:3e7de538b366 | 12 | wait(1); |
eqon | 0:3e7de538b366 | 13 | } |
eqon | 0:3e7de538b366 | 14 | |
eqon | 0:3e7de538b366 | 15 | |
eqon | 0:3e7de538b366 | 16 | wait(2); |
eqon | 0:3e7de538b366 | 17 | |
eqon | 0:3e7de538b366 | 18 | led.blinks(1,3);//blocking, code 1, 3 blinks, code will not continue until blinks done |
eqon | 0:3e7de538b366 | 19 | led.blinkSet(2,3);//blocking, code stops here, blinks will continue blinking |
eqon | 0:3e7de538b366 | 20 | |
eqon | 0:3e7de538b366 | 21 | |
eqon | 0:3e7de538b366 | 22 | return 0; |
eqon | 0:3e7de538b366 | 23 | } |