添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
爽快的大熊猫  ·  UncategorizedMongoDbEx ...·  10 月前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I'm trying to upload the blink code to Arduino but I'm getting this error. Could someone help me?

  Arduino: 1.6.9 (Mac OS X), Board: "Arduino Duemilanove or Diecimila, ATmega328"
Sketch uses 1,066 bytes (3%) of program storage space. Maximum is 30,720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x04
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xfc
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x8a
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x88
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

-This is the code I'm trying to upload. Its straight off the Arduino example.

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second
                This has nothing to do with your arduino code (it has not ever reached the arduino). Look for things like a bad cable, incorrect port selected, reset the arduino, close serial monitor, unplug/re-plug usb cable, etc.
– mhopeng
                Jun 20, 2016 at 5:03
                Is the board really a Duemilanove or Diecimila?  If not, change the IDE setting under Tools | Board to the correct board.
– wallyk
                Jun 21, 2016 at 0:01
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.