Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

arduino - Issue on Verification error , first mismatch at type 0x0000

I am beginner in arduino. Here I tried to burn/upload a code from arduino IDE. Code executes successfully but problem is on uploading time. It shows Verification error , first mismatch at type 0x0000. 0x62 !=0x0c. I am trying to burn it from windows pc. Here is my code

int trigPin = 11;    // Trigger
int echoPin = 12;    // Echo
long duration, cm, inches;

void setup() {
  Serial.begin (9600);
  //Define inputs and outputs
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
}

void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(5);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);


pinMode(echoPin, INPUT);
duration = pulseIn(echoPin, HIGH);

// Convert the time into a distance
cm = (duration/2) / 29.1;     // Divide by 29.1 or multiply by 0.0343
inches = (duration/2) / 74;   // Divide by 74 or multiply by 0.0135

Serial.print(inches);
Serial.print("in, ");
Serial.print(cm);
Serial.print("cm");
Serial.println();

delay(250);
} 

Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino Uno" Sketch uses 444 bytes (1%) of program storage space. Maximum is 32256 bytes. Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes. An error occurred while uploading the sketch avrdude: verification error, first mismatch at byte 0x0000 0x62 != 0x0c avrdude: verification error; content mismatch @Piglet thanks for advice . Here is error details

question from:https://stackoverflow.com/questions/65878698/issue-on-verification-error-first-mismatch-at-type-0x0000

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

There are plenty of posts online about that error. You should be able to find them as well.

The most suggested solution is to burn the bootloader as in this post: https://forum.arduino.cc/index.php?topic=453997.0

The bootloader is a small program that is on the Arduino Unos microcontroller. It is necessary to get your application on the the microcontroller via the USB interface. You would need a IPS programmer otherwise.

To burn the bootloader you need a dedicated AVR ISP programmer or a second Arduino. You can get them for little money online.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...