Library for led
RGB LED library
users/gimohd/code/LED/
[Not found]
lib/PoliceLight.cpp@0:5368b27ca9d0, 2015-12-10 (annotated)
- Committer:
- gimohd
- Date:
- Thu Dec 10 15:06:29 2015 +0000
- Revision:
- 0:5368b27ca9d0
publis library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gimohd | 0:5368b27ca9d0 | 1 | #include "Effect.h" |
gimohd | 0:5368b27ca9d0 | 2 | #include "PoliceLight.h" |
gimohd | 0:5368b27ca9d0 | 3 | #include "RGB.h" |
gimohd | 0:5368b27ca9d0 | 4 | #include "Color.h" |
gimohd | 0:5368b27ca9d0 | 5 | |
gimohd | 0:5368b27ca9d0 | 6 | |
gimohd | 0:5368b27ca9d0 | 7 | PoliceLight::PoliceLight(RGB* led) |
gimohd | 0:5368b27ca9d0 | 8 | :Effect(led){ |
gimohd | 0:5368b27ca9d0 | 9 | |
gimohd | 0:5368b27ca9d0 | 10 | } |
gimohd | 0:5368b27ca9d0 | 11 | |
gimohd | 0:5368b27ca9d0 | 12 | void PoliceLight::run(){ |
gimohd | 0:5368b27ca9d0 | 13 | led->setColor(Color::RED); |
gimohd | 0:5368b27ca9d0 | 14 | wait_ms(500); |
gimohd | 0:5368b27ca9d0 | 15 | led->setColor(Color::BLUE); |
gimohd | 0:5368b27ca9d0 | 16 | wait_ms(500); |
gimohd | 0:5368b27ca9d0 | 17 | } |