Piet Cordemans
/
state-example
Example code to toggle the RGB LED of the application shield with a State Machine
main.cpp@0:00a89ddb74dc, 2020-10-28 (annotated)
- Committer:
- pcordemans
- Date:
- Wed Oct 28 12:17:07 2020 +0000
- Revision:
- 0:00a89ddb74dc
Toggles RGB led with a State Machine
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pcordemans | 0:00a89ddb74dc | 1 | #include "mbed.h" |
pcordemans | 0:00a89ddb74dc | 2 | #include "StateMachine.h" |
pcordemans | 0:00a89ddb74dc | 3 | |
pcordemans | 0:00a89ddb74dc | 4 | PwmOut r (D5); |
pcordemans | 0:00a89ddb74dc | 5 | PwmOut g (D8); |
pcordemans | 0:00a89ddb74dc | 6 | PwmOut b (D9); |
pcordemans | 0:00a89ddb74dc | 7 | |
pcordemans | 0:00a89ddb74dc | 8 | int main() |
pcordemans | 0:00a89ddb74dc | 9 | { |
pcordemans | 0:00a89ddb74dc | 10 | StateMachine statemachine; |
pcordemans | 0:00a89ddb74dc | 11 | statemachine.start(); |
pcordemans | 0:00a89ddb74dc | 12 | } |