Light Show library for organic, calm, light display.

Dependencies:   BLE_API mbed nRF51822

Fork of mbed_blinky by Mbed

Revision:
24:52319c0a14b8
Child:
25:d48f46d753fd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sinusoid.h	Sat Jan 30 20:07:55 2016 +0000
@@ -0,0 +1,28 @@
+#ifndef SINUSOID_H
+#define SINUSOID_H
+
+class Sinusoid {
+public:
+
+/** Get value of Sinusoid
+*   Returns a float between 0 and 1
+*     - This value is zero if time is < wait
+**/
+    float get_y();
+    
+private:
+    Sinusoid(float wait, float frequency);
+    
+    long int time;
+    // PI macros
+    static const float INCREMENT = 0.00628*4;
+    static const float HPI = 1.571;
+    static const float PI = 3.1416;
+    
+    float wait; // before this y is zero
+    float frequency;
+    
+    
+};
+
+#endif
\ No newline at end of file