PROBLEM IN UPLOADING

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

PROBLEM IN UPLOADING

Postby Ester » Sat Mar 02, 2013 4:13 am

please help me!!
after uploading it always says "avrdude: stk500_getsync(): not in sync: resp=0x1c"
i hope you can help me :( :(


Code: Select all
/*
  GSM Send Sketch for Arduino
 
  Initializes GSM Module and sends an SMS to recipient
 
  The circuit:
  *Arduino pin 0 (RX) - GSM Module (TX)
  *Arduino pin 1 (TX) - GSM Module (RX)
 
  Created 2010
  by Meann Zabanal
  Modified
  by John for GSM Shield testing
*/

char Rx_data[50];
unsigned char Rx_index = 0;
int i = 0;
char msg[160];
int sig;

void setup() {
  Serial.begin(38400);
 
  initGSM();
  send_msg("09167029131", "Arjen Garcia");
}

void loop() {
  //none
}

void send_msg(char *number, char *msg)
{
  char at_cmgs_cmd[30] = {'\0'};
  char msg1[160] = {'\0'};
  char ctl_z = 0x1a;

  sprintf(msg1, "%s%c", msg, ctl_z);
  sprintf(at_cmgs_cmd, "AT+CMGS=\"%s\"\r\n",number);
 
  sendGSM(at_cmgs_cmd);
  delay(100);
  delay(100);
  delay(100);
  sendGSM(msg1);
  delay(100);
}

void sendGSM(char *string){
  Serial.write(string);
  delay(90);
}

void clearString(char *strArray) {
  int j;
  for (j = 100; j > 0; j--)
    strArray[j] = 0x00;
}

void send_cmd(char *at_cmd, char clr){
  char *stat = '\0';
  while(!stat){
    sendGSM(at_cmd);
    delay(90);
    readSerialString(Rx_data);
   
    stat = strstr(Rx_data, "OK");
  }
  if (clr){
    clearString(Rx_data);
    delay(200);
    stat = '\0';
  }
}

void initGSM(){
 
  send_cmd("AT\r\n",1);                  
//  send_cmd("ATE0\r\n",1); // Turn off automatic echo of the GSM Module   
   
  send_cmd("AT+CMGF=1\r\n",1);         // Set message format to text mode
  //Sucess
 
  Serial.println("Success");
   
  delay(1000);
  delay(1000);
  delay(1000);
}

void readSerialString (char *strArray) {
 
  if(!Serial.available()) {
    return;
  }
 
  while(Serial.available()) {
    strArray[i] = Serial.read();
    i++;
  }
}

Ester
 
Posts: 1
Joined: Sat Mar 02, 2013 4:04 am

Re: PROBLEM IN UPLOADING

Postby adafruit_support_bill » Sat Mar 02, 2013 7:08 am

Make sure you have the right board-type and COM port selected in the IDE.
User avatar
adafruit_support_bill
 
Posts: 15892
Joined: Sat Feb 07, 2009 9:11 am


Return to Arduino

Who is online

Users browsing this forum: mibignistinly and 9 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [105]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[108]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[69]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]