A nice BLE demo program which allows remote switch of an LED via GATT interface.
Dependencies: BLE_API mbed nRF51822
Fork of BLE_Button by
bricks/blink.h@11:80f2c19ecbce, 2017-01-07 (annotated)
- Committer:
- hux
- Date:
- Sat Jan 07 23:48:53 2017 +0000
- Revision:
- 11:80f2c19ecbce
New Blob class derived from BLE class
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hux | 11:80f2c19ecbce | 1 | // blink.h - blinking sequences for LED1 |
hux | 11:80f2c19ecbce | 2 | #ifndef _BLINK_H_ |
hux | 11:80f2c19ecbce | 3 | #define _BLINK_H_ |
hux | 11:80f2c19ecbce | 4 | |
hux | 11:80f2c19ecbce | 5 | #include <mbed.h> |
hux | 11:80f2c19ecbce | 6 | |
hux | 11:80f2c19ecbce | 7 | # define IDLE "x " // 'idle' blinking sequence |
hux | 11:80f2c19ecbce | 8 | # define ADVERTISE "x xxx " // 'advertise' blinking sequence |
hux | 11:80f2c19ecbce | 9 | # define CONNECTED " xxx " // 'connected' blinking sequence |
hux | 11:80f2c19ecbce | 10 | # define ACTION "x x x x x " // 'action' blinking sequence |
hux | 11:80f2c19ecbce | 11 | # define FAULT "x x x x xxx " // 'fault' blinking sequence |
hux | 11:80f2c19ecbce | 12 | |
hux | 11:80f2c19ecbce | 13 | void morse(const char *pattern, double periode = 0.2); |
hux | 11:80f2c19ecbce | 14 | void blink(const char *pattern, const char* next, double interval = 0.2); |
hux | 11:80f2c19ecbce | 15 | void blink(const char *pattern, double periode = 0.2); |
hux | 11:80f2c19ecbce | 16 | |
hux | 11:80f2c19ecbce | 17 | #endif // _BLINK_H_ |