Adafruit is open, safely ... and shipping all orders at this time! Read more!
0

Avrdude not in sync when trying to program BTArduino
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Avrdude not in sync when trying to program BTArduino

by rohanbk on Wed Feb 18, 2009 2:00 pm

I recently purchased a Bluetooth Arduino and I wanted to upload the standard Blink program to it to see if it worked. I found out that because of the default bootloader that the Arduino came with, that no cables were necessary. I modified the baud-rate of the COM port in both the device manager (I set it to 115200) and in my program. However, when I try uploading my code, it gives the following error:
Code: Select all | TOGGLE FULL SIZE
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51


The code that I uploaded to the board is the following:
Code: Select all | TOGGLE FULL SIZE
char val; // variable to receive data from the serial port
int ledpin = 8; // LED connected to pin 48 (on-board LED)

void setup() {

  pinMode(ledpin, OUTPUT);  // pin 48 (on-board LED) as OUTPUT
  Serial.begin(115200);       // start serial communication at 9600bps
}

void loop() {

  if( Serial.available() )       // if data is available to read
  {
    val = Serial.read();         // read it and store it in 'val'
  }
  if( val == 'H' )               // if 'H' was received
  {
    digitalWrite(ledpin, HIGH);  // turn ON the LED
  } else {
    digitalWrite(ledpin, LOW);   // otherwise turn it OFF
  }
  delay(100);                    // wait 100ms for next reading 
}


The Arduino is connecting to the desktop I am working on using a plug and play USB adapter. I was able to successfully pair the Arduino to the adapter without any problems. Any help with this problem would be wonderful. Thanks!
rohanbk
 
Posts: 4
Joined: Wed Feb 18, 2009 1:44 pm

Please be positive and constructive with your questions and comments.