SO CLOSE TO FINALLY GIVING UP !!
I cant get this F'in Bootloader to work !!
avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "C:\Users\Leon Mckenzie\Desktop\CanSatDuino\Ardiuno\arduino-1.0\hardware/tools/avr/etc/avrdude.conf"
Using Port : \.\COM2
Using Programmer : arduino
Overriding Baud Rate : 19200
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude done. Thank you.
As allways.
I have tried everything in every forum/blog/guide etc... Dont think this ATMega is geared for this bootloader.
The most frustrating is that the board works perfectly... I burn the Fio bootloader (with my AVRISP MK2 in Arduino IDE) to it and program my sketch also via the MK2 then it works. But with my serial board NEA... And don't get me wrong the serial board works.. I did the loop test and I can get a serial stream from the board and display it in serial monitor. But I always get the sync error when I try to upload a sketch.
Any Suggestions ????
Just to Add I know both TX and RX works because I successfully loaded this sketch and it worked.
//PCtoArd
//ver 26Jly10
//#include <avr/pgmspace.h>
//#include <sensor_pff.h>
//SENSOR_PFF sd;
//byte sensor_start = 0;
#define LEDpin A0 //no ; here
char buff[128]; /* i/o buffer, for get_line */
boolean boFlashQuickly=false;
void setup()
{
pinMode(LEDpin,OUTPUT);
delay(300);//let system settle
Serial.begin(9600);
Serial.println("\n\nDemo of control of Arduino from PC\n");
Serial.println("See http://sheepdogguides.com/ardino/ahttoc.htm\n");
Serial.println("for latest details.\n");
Serial.println("\nPress the enter key after pressing s or q.\n");
Serial.print('>');
}
void loop()
{
char *ptr;
if(Serial.available()==true){//Cmnds waiting
get_line(buff, sizeof(buff));
ptr = buff;
switch (*ptr++) {//switch
case 'q': // Quickly flash
//Serial.print("\nWill flash quickly\n");
boFlashQuickly=true;
break;//end "q"
case 's': // Slowly flash
//Serial.print("\nWill flash slowly\n");
boFlashQuickly=false;
break;//end "q"
default:
Serial.print("Unrecognized. Only s and q recognized\n");
break;//end default
}//end "switch..."
Serial.print('>');
}//if, cmnd waiting
else {//1 no cmnds waiting
if (boFlashQuickly){//2
QuicklyFlash();
}//end if "2"
else {//2
SlowlyFlash();
}//end of else(2)
}//1 end of level 1 "if" clause, no cmnds waiting
}//end "loop()"
void QuicklyFlash(){
LEDOn();
delay(100);
LEDOff();
delay(100);
}
void SlowlyFlash(){
LEDOn();
delay(900);
LEDOff();
delay(900);
}
void LEDOn(){
digitalWrite(LEDpin,LOW);//Yes- LOW for ON
};
void LEDOff(){
digitalWrite(LEDpin,HIGH);
};
//Treat "GET_LINE" as a black box, for now.
//Nothing to change in it.
//Press the "enter" key after entering your 1 letter command
static void get_line (char *buff, byte len)
{
byte c;
int idx = 0;
for (; {//1 Start infinite loop... will only exit via "break"
if(Serial.available()){//2
c = Serial.read();
if (((byte)c >= ' ') && (idx < len - 1)) {
buff[idx++] = c; Serial.print(c);
}//3
}else break;//2
}//1 (ends "for...")
buff[idx] = 0;
// Serial.print(c);
Serial.print('\n');
}
// === END OF GET_LINE ===