Tutorial 2 - SOS: This is an embedded program which controls LED1 in order to show a blinking SOS pattern. The tutorial starts to organize helper functions like "morse" in a brick library which will grow and grow with each tutorial. Platform specifics are identified in "bricks/platform.h" by setting proper defines (like LED_INVERTED), which are used to achieve platform independent behaviour. The program has been tested on Nordic nRF51-DK and STM NUCLEO-F303K8, NUCLEO-F401RE and NUCLEO-L476RG.
bricks/blink.h@1:10299215b49e, 2016-12-10 (annotated)
- Committer:
- hux
- Date:
- Sat Dec 10 18:34:23 2016 +0000
- Revision:
- 1:10299215b49e
Some fine tuning; readme file added
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hux | 1:10299215b49e | 1 | // blink.h - blinking sequences for LED1 |
hux | 1:10299215b49e | 2 | #ifndef _BLINK_H_ |
hux | 1:10299215b49e | 3 | #define _BLINK_H_ |
hux | 1:10299215b49e | 4 | |
hux | 1:10299215b49e | 5 | #include <mbed.h> |
hux | 1:10299215b49e | 6 | |
hux | 1:10299215b49e | 7 | void morse(const char *pattern, double periode = 0.2); |
hux | 1:10299215b49e | 8 | |
hux | 1:10299215b49e | 9 | #endif // _BLINK_H_ |