Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: TinyTuner not compiling on: January 18, 2013, 11:49:04 am
Thanks Majenko!!
It worked!
2  Using Arduino / Programming Questions / Re: TinyTuner not compiling on: January 18, 2013, 06:56:27 am
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.
3  Using Arduino / Programming Questions / Re: TinyTuner not compiling on: January 18, 2013, 06:15:14 am
Code:
#include <TinyTuner.h>
#include <avr/pgmspace.h>

const char Hello[] PROGMEM =
"\r\n\r\n\r\n\r\n"
"--------------------------------------------------------------------------------\r\n"
"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 =
"\r\n\r\n";

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

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

const char Bye2[] PROGMEM =
";\r\n\r\n"
"--------------------------------------------------------------------------------\r\n";

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 )
  {
    ++Step;
    Serial.write( ' ' );
   
    if ( Step < 10 )
    {
      Serial.write( ' ' );
    }
    Serial.print( Step );
    Serial_printP( Pad5 );

    KeepGoing = tt.update();
   
    Serial.print( OSCCAL, HEX );
    Serial.println();
  }
  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 );
    ++p;
    ch = pgm_read_byte( p );
  }
}
4  Using Arduino / Programming Questions / TinyTuner not compiling on: January 18, 2013, 05:20:31 am
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.
Pages: [1]