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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…