Use the hardware PwmOut to pulsate an LED (or something else), with selectable active high/low, customisable intensity function, gamma correction, and number of brightness levels.
Diff: Pulsator.h
- Revision:
- 7:7abc04b4c474
- Parent:
- 6:5eeb1acc1c50
- Child:
- 8:ddedf56b2eb0
--- a/Pulsator.h Sun Apr 26 01:39:38 2015 +0000 +++ b/Pulsator.h Sun Apr 26 01:43:31 2015 +0000 @@ -42,7 +42,7 @@ operator bool(void); Pulsator& active_high(bool high = false); - Pulsator& gamma(float power = 2.2); + Pulsator& gamma(float power = 2.2f); Pulsator& levels(int number = 128); - Pulsator& period(float seconds = 1.0); + Pulsator& period(float seconds = 1.0f); };