Light Show library for organic, calm, light display.
Dependencies: BLE_API mbed nRF51822
Fork of mbed_blinky by
light_show.h
- Committer:
- nargetdev
- Date:
- 2016-02-01
- Revision:
- 25:d48f46d753fd
- Parent:
- 24:52319c0a14b8
- Child:
- 26:8bc9984c4600
File content as of revision 25:d48f46d753fd:
#ifndef LIGHT_SHOW_H #define LIGHT_SHOW_H #include "macros.h" #include "config.h" #include "utility.h" #include "rgb_led.h" #include "sinusoid.h" extern Serial pc; const float HYSTERESIS_QUANTITY = HPI; const float INCREMENT = 0.05f; class LightShow { public: LightShow(Rgb*); void randomize_params(); void show(); void simple_show(); /** sanity check **/ private: Rgb* strip; Sinusoid sine_waves[3]; // get some randomness Timer t; static const float HYSTERESIS_QUANTITY = PI/4; float time; // phase uint8_t finished; // bit mask for smooth fade out float hysteresis; float rgb_c[3]; void update_rgb(); }; #endif