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.
Dependencies: mbed
LUTs/LUTS.cpp
- Committer:
- lukeocarwright
- Date:
- 2020-05-05
- Revision:
- 7:33cb5f2db1ee
- Child:
- 9:f6ba53e355a0
File content as of revision 7:33cb5f2db1ee:
#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
}
}