Example code displaying how to use and implement the mbed RTOS along with a simple state machine used to capture button presses.
Fork of mbed-rtos by
color.h@106:1b09dd92c3f1, 2016-02-25 (annotated)
- Committer:
- gelmes
- Date:
- Thu Feb 25 17:17:04 2016 +0000
- Revision:
- 106:1b09dd92c3f1
- Parent:
- 105:d7ee57473fdb
Simple Color Changing LED. USER_MODE button used as input to switch LED animation state. Simple Button press state machine used.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gelmes | 105:d7ee57473fdb | 1 | #ifndef COLOR_H |
gelmes | 105:d7ee57473fdb | 2 | #define COLOR_H |
gelmes | 105:d7ee57473fdb | 3 | class Color |
gelmes | 105:d7ee57473fdb | 4 | { |
gelmes | 105:d7ee57473fdb | 5 | public: |
gelmes | 105:d7ee57473fdb | 6 | float r; |
gelmes | 105:d7ee57473fdb | 7 | float g; |
gelmes | 105:d7ee57473fdb | 8 | float b; |
gelmes | 105:d7ee57473fdb | 9 | Color(float red, float green, float blue); |
gelmes | 105:d7ee57473fdb | 10 | |
gelmes | 105:d7ee57473fdb | 11 | }; |
gelmes | 105:d7ee57473fdb | 12 | |
gelmes | 105:d7ee57473fdb | 13 | |
gelmes | 105:d7ee57473fdb | 14 | #endif |