Luke Cartwright / Mbed 2 deprecated ELEC2645_Project_el18loc_nearlythere

Dependencies:   mbed

Revision:
7:33cb5f2db1ee
Child:
9:f6ba53e355a0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LUTs/LUTS.cpp	Tue May 05 14:32:04 2020 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "LUTs.h"
+
+LUTs::LUTs()
+{
+}
+LUTs::~LUTs()
+{
+}
+
+
+void LUTs::sin_wavetable()
+{
+    printf("Generating Wavetable \n");
+    for (int i=0; i<4096; i++) {
+        sin_d[i] = 0.5f*sin(2.0f*PI*(i/4096.0f));
+        wavtable[i]= sin_d[i]+0.5; //generates wave table 0<1 in double
+        //printf("wav[i]= %f \n", wavtable[i]); // Used for Debug
+    }
+}
\ No newline at end of file