/Designs/HAM_Constructions/Radiotelescope/SW/ARM/sinegen/sinegen.c
0,0 → 1,20
#include <stdio.h>
#include <stdint.h>
#include <math.h>
 
#define DEG2RAD M_PI/180
 
int main(int argc, char** argv)
{
printf("int8_t sinewave[360] = {");
 
int i;
for (i = 0; i < 360; i++) {
printf("%d", (int8_t) (sin(((float) i) * DEG2RAD) * 127));
 
if (i != 359)
printf(", ");
}
 
printf("};\n");
}