Hello There . I would really like to get the FFT frequency analyzer project working , or the Arduino PONG sketch working but anything with TV Out is giving me problems like:
sorry i was reffering to other peoples code and i wasnt sure if i could post that
here goes:
#include <TVout.h> #include <fix_fft.h>
TVout TV;
char im[128], data[128], lastpass[64];
char x=32, ylim=90;
int i=0,val;
void setup()
{
TV.begin(NTSC,128,54); // Initialize TV output, 128x96.
TV.print_str(2,2," Realtime Arduino"); // TVout lib uses x,y for print
TV.print_str(2,11," Spectrum Analyzer"); // statements. 8x8 default font.
analogReference(DEFAULT); // Use default (5v) aref voltage.
for (int z=0; z<64; z++) {lastpass[z]=80;}; // fill the lastpass[] array with dummy data
};
void loop()
{
for (i=0; i < 128; i++){ // We don't go for clean timing here, it's
val = analogRead(0); // better to get somewhat dirty data fast
data = val/4 -128; // than to get data that's lab-accurate
_ im = 0; // but too slow, for this application. * };* * fix_fft(data,im,7,0);*
* for (i=1; i< 64;i++){ // In the current design, 60Hz and noise* data = sqrt(data * data + im * im*); // in general are a problem. Future designs* TV.draw_line(i+x,lastpass*,i+x,ylim,0); // and code may fix this, but for now, I* TV.draw_line(i+x,ylim,i+x,ylim-data*,1); // skip displaying the 0-500hz band completely. lastpass_=ylim-data; // if you insist, initialize the loop with 0* * }; // rather than 1. };*_
and then i updated the TVOUT with the newest beta...and i think that was the problem as they specify that the print.string has been removed from the newest version