Arduino Nano | LCD I2C | GY-906 | Battery Pack | 9v Battery | Accessories |
---|---|---|---|---|---|
|
-
Install library in Arduino IDE via Sketch → Include Library → Search for library
- Adafruit MLX90614 Library
- LiquidCrystal I2C
-
Upload Arduino Code from the Repo
// Initial Value
float temp_amb = 28;
float temp_obj = 36;
float P = 1;
float Q = 0.1;
float R = 4;
float P_xz;
float P_zz;
// Kalman Filter
// Time Update
temp_amb = temp_amb;
temp_obj = temp_obj;
P = P + Q;
// Measurement Update
P_xz = P;
P_zz = P + R;
temp_amb = temp_amb + (P_xz/P_zz)*(mlx.readAmbientTempC()-temp_amb);
temp_obj = temp_obj + (P_xz/P_zz)*(mlx.readObjectTempC()-temp_obj);
P = P - (P_xz*P_xz)/P_zz;