Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: LUTs/LUTS.cpp
- 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