serial monitor issues

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

serial monitor issues

Postby CharlieJ » Sat Jul 07, 2012 9:37 pm

This is a two part question, i have verified a motor shield code and it works in the arduino but when I try to look at the serial momitor its blank and this error code shows; stk500_get sync(): not in sync;resp=0x30. do I have two problems or are they related ? it shows com3 on the monitor screen and in the setup , a possible cable issue? Serial port is com 3. Thanks Charlie J

[Edit - moderator - Please use the 'code' button when submitting code]
Code: Select all
  #include <AFMotor.h>

AF_DCMotor motor1(3, MOTOR12_64KHZ);// create motor #2, 64KHz pwm
AF_DCMotor motor2(4,MOTOR12_64KHZ);
void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Motor test!");
 
  motor1.setSpeed(200);     // set the speed to 200/255
  motor2.setSpeed(200);
}

void loop() {
  Serial.print("Ahead");
 
  motor1.run(FORWARD);      // turn it on going forward
  motor2.run(FORWARD);
  delay(5000);
 
  Serial.print("Stop");
  motor1.run(RELEASE);
  motor2.run(RELEASE);
  delay(1000);
 
Serial.print("Turn");
  motor1.run(FORWARD);
  motor2.run(BACKWARD);
  delay(1500);
 
   Serial.print("Stop");
  motor1.run(RELEASE);
  motor2.run(RELEASE);
  delay(1000);
 
 
  motor1.run(FORWARD);      // turn it on going forward
  motor2.run(FORWARD);
  delay(5000);
 
   Serial.print("Stop");
  motor1.run(RELEASE);
  motor2.run(RELEASE);
  delay(1000);
 
  Serial.print("astern");
  motor1.run(BACKWARD);     // the other way
  motor2.run(BACKWARD);
  delay(4000);
 
  Serial.print("Stop");
  motor1.run(RELEASE);      // stopped
  motor2.run(RELEASE);
  delay(1000);
 
  Serial.print("Turn");
  motor1.run(FORWARD);
  motor2.run(BACKWARD);
  delay(1500);
 
  Serial.print("Stop");
  motor1.run(RELEASE);
  motor2.run(RELEASE);
  delay(2000);
 
   motor1.run(FORWARD);      // turn it on going forward
  motor2.run(FORWARD);
  delay(5000);
 
  Serial.print("Stop");
  motor1.run(RELEASE);
  motor2.run(RELEASE);
  delay(1000);
 
  Serial.print("TurnOpp");
  motor1.run(BACKWARD);
  motor2.run(FORWARD);
  delay(1500);
 
  Serial.print("Stop");
  motor1.run(RELEASE);
  motor2.run(RELEASE);
  delay(1000);
 
  motor1.run(FORWARD);      // turn it on going forward
  motor2.run(FORWARD);
  delay(5000);
 
  Serial.print("Stop");
  motor1.run(RELEASE);
  motor2.run(RELEASE);
  delay(3000);
}
CharlieJ
 
Posts: 43
Joined: Tue Nov 29, 2011 10:59 pm

Re: serial monitor issues

Postby adafruit_support_bill » Sun Jul 08, 2012 4:34 am

when I try to look at the serial momitor its blank and this error code shows; stk500_get sync(): not in sync;resp=0x30.

Where are you seeing that error code? In the serial monitor, or the diagnostic window at the bottom of the IDE? And does it show up only when you open the serial monitor?

A common cause of the serial monitor window showing garbage or nothing at all is if the baud-rate set differently than in your sketch. You sketch sets it to 9600 in "Serial.begin(9600);". Make sure that it is also set to 9600 in the serial monitor.

The error message you mention is typically seen when attempting to upload. But you are saying that the sketch is working, so your upload must have succeeded. Please clarify when and where you are seeing this message.
User avatar
adafruit_support_bill
 
Posts: 15931
Joined: Sat Feb 07, 2009 9:11 am

Re: serial monitor issues

Postby CharlieJ » Tue Jul 10, 2012 10:43 pm

The error code shows up after the upload in the bottom error screen after the line that says it compiled ok, while I am trying to see the monitor screen. Charlie J
CharlieJ
 
Posts: 43
Joined: Tue Nov 29, 2011 10:59 pm

Re: serial monitor issues

Postby adafruit_support_bill » Wed Jul 11, 2012 4:50 am

The error code shows up after the upload in the bottom error screen after the line that says it compiled ok

So it compiled, but it did not upload. Double check that you have the correct COM port and Board type selected in the "Tools" menu. Verify that the COM port has not changed (sometimes this happens on Windows machines).
User avatar
adafruit_support_bill
 
Posts: 15931
Joined: Sat Feb 07, 2009 9:11 am

Re: serial monitor issues

Postby franklin97355 » Wed Jul 11, 2012 5:10 pm

You caqn't have the serial monitor and the IDE trying to use the same com port at the same time, it just does not work in windows.
User avatar
franklin97355
 
Posts: 1706
Joined: Mon Apr 21, 2008 1:33 pm

Re: serial monitor issues

Postby CharlieJ » Thu Jul 12, 2012 9:53 pm

In my previous post I did not know that the code did not uploadas it was a small change to the code. I was working with a bump switch and I have problems. So I tried the basic blink code and it did not load, and the error code" avrdude; stk500_getsync(); not in sync;reap=0x30"
This is in the error box at the bottom of page. I have rechecked the baub rate set 9600 as the baud rate of the serial monitor. Like I found out the basic blink did not load. I do not see both transmit and receive led's flashing. What did I do wrong Charlie J
CharlieJ
 
Posts: 43
Joined: Tue Nov 29, 2011 10:59 pm

Re: serial monitor issues

Postby CharlieJ » Thu Jul 12, 2012 9:58 pm

I think I just solved my problem the com port was incorrect. I had a little success. Thanks any way charlie J
CharlieJ
 
Posts: 43
Joined: Tue Nov 29, 2011 10:59 pm


Return to Arduino Shields from Adafruit

Who is online

Users browsing this forum: Ronnord and 9 guests

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


New Products [102]

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]