Light Show library for organic, calm, light display.

Dependencies:   BLE_API mbed nRF51822

Fork of mbed_blinky by Mbed

Committer:
nargetdev
Date:
Sat Jan 30 20:07:55 2016 +0000
Revision:
24:52319c0a14b8
Child:
25:d48f46d753fd
main test harness

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nargetdev 24:52319c0a14b8 1 #ifndef LIGHT_SHOW_H
nargetdev 24:52319c0a14b8 2 #define LIGHT_SHOW_H
nargetdev 24:52319c0a14b8 3
nargetdev 24:52319c0a14b8 4 class LightShow
nargetdev 24:52319c0a14b8 5 {
nargetdev 24:52319c0a14b8 6 public:
nargetdev 24:52319c0a14b8 7 void randomize_params();
nargetdev 24:52319c0a14b8 8 void drive();
nargetdev 24:52319c0a14b8 9
nargetdev 24:52319c0a14b8 10 private:
nargetdev 24:52319c0a14b8 11 static const float HYSTERESIS_QUANTITY = PI/4;
nargetdev 24:52319c0a14b8 12
nargetdev 24:52319c0a14b8 13 // Arbitrary params for the show
nargetdev 24:52319c0a14b8 14 static const float RWAIT = 0;
nargetdev 24:52319c0a14b8 15 static const float GWAIT = PI/8;
nargetdev 24:52319c0a14b8 16 static const float BWAIT = PI/4;
nargetdev 24:52319c0a14b8 17 float WAIT [3];
nargetdev 24:52319c0a14b8 18 float SCALE [3];
nargetdev 24:52319c0a14b8 19
nargetdev 24:52319c0a14b8 20 // channel operators
nargetdev 24:52319c0a14b8 21 float rgb_c[3];
nargetdev 24:52319c0a14b8 22 float in; // phase
nargetdev 24:52319c0a14b8 23 uint8_t rgb;
nargetdev 24:52319c0a14b8 24 float hysteresis;
nargetdev 24:52319c0a14b8 25
nargetdev 24:52319c0a14b8 26 uint8_t i;
nargetdev 24:52319c0a14b8 27 };
nargetdev 24:52319c0a14b8 28
nargetdev 24:52319c0a14b8 29 #endif