# Need help how to fix these errors

**URL:** <https://forum.arduino.cc/t/need-help-how-to-fix-these-errors/959499>\
**Category:** Programming\
**Created:** [February 15, 2022, 3:53pm UTC](https://forum.arduino.cc/t/need-help-how-to-fix-these-errors/959499 "2022-02-15T15:53:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![randy\_serv](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@randy\_serv](https://forum.arduino.cc/u/randy_serv)\
**Post date:** [February 15, 2022, 3:53pm UTC](https://forum.arduino.cc/t/need-help-how-to-fix-these-errors/959499/1 "2022-02-15T15:53:03Z")

</div>

```cpp
#include <U8glib.h>
#include <Adafruit_MLX90614.h>
#include <Adafruit_GFX.h>
#include <MCUFRIEND_kbv.h>

#define BLACK 0x0000
#define RED 0xF800
#define WHITE 0xFFFF
#define GREEN 0x07E0
#define DARKGREEN 0x03E0
#define DARKGREY 0x7BEF

MCUFRIEND_kbv tft;

Adafruit_MLX90614 mlx = Adafruit_MLX90614();

const int trigPin = 52;
const int echoPin = 53;
// defines variables
long duration;
int distance=0;

void setup() {
  Serial.begin(9600);
 
  pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
  pinMode(echoPin, INPUT); // Sets the echoPin as an Input
  mlx.begin();  
  

}

void loop() {
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH); //read the raw timer value 
  distance= duration*0.034/2; //Calculate the distance

  
 
  tft.print("Distance:");
  tft.println(distance);
  tft.setCursor(65, 220);
  tft.setTextSize(4);
  tft.setTextColor(GREEN);
  tft.print("Temp. :");
  tft.print(mlx.readObjectTempC());
  tft.println("*C");
  tft.println();
  
  delay(500);
}

```

Arduino: 1.8.19 (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 15746 bytes (6%) of program storage space. Maximum is 253952 bytes.

Global variables use 550 bytes (6%) of dynamic memory, leaving 7642 bytes for local variables. Maximum is 8192 bytes.

avrdude: verification error, first mismatch at byte 0x026c

```
     0x24 != 0x64

```

avrdude: verification error; content mismatch

avrdude: verification error; content mismatch

This report would have more information with  
"Show verbose output during compilation"  
option enabled in File -\> Preferences.

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [February 15, 2022, 4:04pm UTC](https://forum.arduino.cc/t/need-help-how-to-fix-these-errors/959499/2 "2022-02-15T16:04:43Z")

</div>

Flash memory may be faulty. Try another board.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [August 14, 2022, 4:04pm UTC](https://forum.arduino.cc/t/need-help-how-to-fix-these-errors/959499/3 "2022-08-14T16:04:51Z")

</div>

Closed on August 14, 2022, 4:04pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
