Hi.
I followed this [hookup guide
Loaded Example2_Get_Temperature into Arduino IDE and it updated the evaluation board with
/******************************************************************************
MLX90614_Serial_Demo.ino
Serial output example for the MLX90614 Infrared Thermometer
This example reads from the MLX90614 and prints out ambient and object
temperatures every half-second or so. Open the serial monitor and set the
baud rate to 9600.
Hardware Hookup (if you're not using the eval board):
MLX90614 ------------- Arduino
VDD ------------------ 3.3V
VSS ------------------ GND
SDA ------------------ SDA (A4 on older boards)
SCL ------------------ SCL (A5 on older boards)
An LED can be attached to pin 8 to monitor for any read errors.
Jim Lindblom @ SparkFun Electronics
October 23, 2015
https://github.com/sparkfun/SparkFun_MLX90614_Arduino_Library
Development environment specifics:
Arduino 1.6.5
SparkFun IR Thermometer Evaluation Board - MLX90614
******************************************************************************/
#include <Wire.h> // I2C library, required for MLX90614
#include <SparkFunMLX90614.h> //Click here to get the library: http://librarymanager/All#Qwiic_IR_Thermometer by SparkFun
IRTherm therm; // Create an IRTherm object to interact with throughout
void setup()
{
Serial.begin(115200); // Initialize Serial to log output
Wire.begin(); //Joing I2C bus
if (therm.begin() == false){ // Initialize thermal IR sensor
Serial.println("Qwiic IR thermometer did not acknowledge! Freezing!");
while(1);
}
Serial.println("Qwiic IR Thermometer did acknowledge.");
therm.setUnit(TEMP_F); // Set the library's units to Farenheit
// Alternatively, TEMP_F can be replaced with TEMP_C for Celsius or
// TEMP_K for Kelvin.
pinMode(LED_BUILTIN, OUTPUT); // LED pin as output
}
void loop()
{
digitalWrite(LED_BUILTIN, HIGH);
// Call therm.read() to read object and ambient temperatures from the sensor.
if (therm.read()) // On success, read() will return 1, on fail 0.
{
// Use the object() and ambient() functions to grab the object and ambient
// temperatures.
// They'll be floats, calculated out to the unit you set with setUnit().
Serial.print("Object: " + String(therm.object(), 2));
Serial.println("F");
Serial.print("Ambient: " + String(therm.ambient(), 2));
Serial.println("F");
Serial.println();
}
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
The correct data was now being sent so the guide worked.
The issue I have is the evaluation board would only let me program it once.
Every time use Ardunio IDE to update with new code, I get
avrdude: arduino_read_sig_bytes(): (a) protocol error, expect=0x10, resp=0x57
avrdude: error reading signature data for part "ATmega328P", rc=-3
avrdude: error reading signature data, rc=-3
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x62
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x62
I’m guessing the Ardunio IDE has done something to the bootloader?
Settings are:
Board: Arduino Pro or Pro Mini
Processor: ATmega328P (3.3V, 8 MHz)
I have purchased the Sparkfun CH340 3v3 serial basic.
Tried with that and still similar errors.
I have Sparkfun Redboards and Ardunio Uno boards, so I could upload a new bootloader.
Not tried that, as the evaluation board is 3V3 and the TX will be 5V.
I could use a 10K resistor between TX of Redboard RX of evaluation board?
I’m waiting on advice before proceeding as don’t want to damage the evaluation board.
Any help to reprogram the evaluation board will be appreciated.
Thank you.](https://learn.sparkfun.com/tutorials/mlx90614-ir-thermometer-hookup-guide)