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@105:d7ee57473fdb, 2016-02-25 (annotated)
- Committer:
- gelmes
- Date:
- Thu Feb 25 16:54:54 2016 +0000
- Revision:
- 105:d7ee57473fdb
Finished Simple Color Changing LED. Used Push Button State Machine and Created two threads, one for LED pulses and one for Button State Machine.
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 |