Go Down

Topic: TinyTuner not compiling (Read 1 time) previous topic - next topic


I'm having trouble with a attiny85 doing serial. After lots of reading and fuse burning I seem to have my attiny85 working but the output on my pc is garbaled. I read about tinytuner and tuning the board. I'm using Arduino IDE 1.0.3 and tinytuner-0003. When I try to compile one of the sketches in the examples directory I get the following error: (I compiled the Interactive_to_serial sketch). I have "Board" set to Attiny85 internal @8MHz

Interactive_to_Serial.pde: In function 'void loop()':
Interactive_to_Serial:113: error: 'TinyTuner' was not declared in this scope
Interactive_to_Serial:113: error: expected `;' before 'tt'
Interactive_to_Serial:134: error: 'tt' was not declared in this scope

Could anybody point me in the right direction. From what I see it seems tiny tuner compiles for everybody and works as advertised.

Thanks in advance.


For those of us that don't have the example sketches could we see it please ?
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.


Code: [Select]

#include <TinyTuner.h>
#include <avr/pgmspace.h>

const char Hello[] PROGMEM =
"Poor Man's Tiny Tuner\r\n"
"Slowly send lowercase 'x' to tune the oscillator...\r\n\r\n";

const char StartingValue1[] PROGMEM =
"  // Starting OSCCAL value is 0x";

const char StartingValue2[] PROGMEM =

const char Header[] PROGMEM =
"Step  OSCCAL\r\n";

const char Bye1[] PROGMEM =
"Copy-and-paste the following line of code at the top of setup...\r\n\r\n"
"  OSCCAL = 0x";

const char Bye2[] PROGMEM =

const char Pad5[] PROGMEM = "     ";

void setup( void )
  Serial.begin( 9600 );
  Serial_printP( Hello );
  Serial_printP( StartingValue1 );
  Serial.print( OSCCAL, HEX );
  Serial_printP( StartingValue2 );

void loop( void )
  TinyTuner tt;
  bool KeepGoing;
  unsigned Step;

  Serial_printP( Header );
  KeepGoing = true;
  Step = 0;
  while ( KeepGoing )
    Serial.write( ' ' );
    if ( Step < 10 )
      Serial.write( ' ' );
    Serial.print( Step );
    Serial_printP( Pad5 );

    KeepGoing = tt.update();
    Serial.print( OSCCAL, HEX );
  Serial_printP( Bye1 );
  Serial.print( OSCCAL, HEX );
  Serial_printP( Bye2 );

void Serial_printP( const char* p )
  char ch;
  ch = pgm_read_byte( p );
  while ( ch != 0 )
    Serial.write( ch );
    ch = pgm_read_byte( p );


Which directory is the TinyTuner library in ?
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.


I just unzipped the files into a temporary directory. There were no instructions to copy anything anywhere so I didn't. I did try to copy the tinytuner.cpp and tinytuner.h file into the same directory as the example code but that didn't help. I tried via the arduino IDE to "add a file" and chose the tinytuner.h file and the IDE told me that the file is already there do I want to overwrite it.


Thanks Majenko!!
It worked!

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!

via Egeo 16
Torino, 10131