I have an STM32F103 (blue pill) and i want to connect with a mix90614 temperature sensor in order to develop a project for my internship.
I want to read temperature, from the sensor.
I use I2C protocol for my sensor (B8---SDA , B9---SCL)
I used Adafruit mlx90614 library.
But since now i can not get data from sensor I get only and always 1037.55*C.
The project compiles OK with no errors.
I use Arduino IDE .
Here is my sample code:
Code: Select all
#include <Wire.h>
#include <Adafruit_MLX90614.h>
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
void setup() {
Serial.begin(9600);
Serial.println("Adafruit MLX90614 test");
mlx.begin();
}
void loop() {
Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempC());
Serial.print("*C\tObject = "); Serial.print(mlx.readObjectTempC()); Serial.println("*C");
Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempF());
Serial.print("*F\tObject = "); Serial.print(mlx.readObjectTempF()); Serial.println("*F");
Serial.println();
delay(500);
}