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.cpp@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 | #include "color.h" |
gelmes | 105:d7ee57473fdb | 2 | |
gelmes | 105:d7ee57473fdb | 3 | Color::Color(float red, float green, float blue) |
gelmes | 105:d7ee57473fdb | 4 | { |
gelmes | 105:d7ee57473fdb | 5 | r = red; |
gelmes | 105:d7ee57473fdb | 6 | g = green; |
gelmes | 105:d7ee57473fdb | 7 | b = blue; |
gelmes | 105:d7ee57473fdb | 8 | }; |
gelmes | 105:d7ee57473fdb | 9 |