Go Down

Topic: TVout.H problems!! (Read 1 time) previous topic - next topic

loss1234

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:

'class TVout' has no member named 'begin'

'class TVout' has no member named 'vert_res'

etc...


what should I do?

thanks

(i am trying with arudino version 22)


bilbo

Well my telepathic senses say that you are not including the header properly, but I'm a lousy psychic, so your code would probably help.
Alice asked the Chesire Cat, who was sitting in a tree, "What road do I take?"
The cat asked, "Where do you want to go?"
"I don't know," Ali

loss1234

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.
    };

Nick Gammon

Try turning your code into "code" blocks (hit the "#" button with the code selected).

Meanwhile, where did you get TVout.h from? My copy has begin in it, but not print_str. And fix_fft.h?
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

loss1234

i got it all from here

http://arduino.cc/forum/index.php/topic,56541.0.html

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

thanks!

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy