6 years, 5 months ago.

I can't visualize Temperature (MLX90614) on DISCO-F429ZI's LCD!

Hello everyone, I'm using the ST-Discovery-F429ZI, and i'm trying to work the MLX90614 sensor on it. Unfortunately i'm not able to visualize the temperature's result on its own LCD screen. Can somebody help me?

I suppose i should write in main.cpp che command:

"#include "LCD_DISCO_F429ZI.h"

but i'm not sure about it...please help me, it's for an exam.

/media/uploads/gianfilippo/img_20171029_194204.jpg

2 Answers

5 years, 2 months ago.

Tenia el mismo problema la solución es declarar una variable char y usar el sprintf que convierte en string mi codigo es el siguiente

  1. include "mbed.h"
  2. include "LCD_DISCO_F429ZI.h"

LCD_DISCO_F429ZI lcd; int dato=2; char texto[20]; int main() { lcd.Clear(LCD_COLOR_BLUE); lcd.SetBackColor(LCD_COLOR_BLUE); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(0,LINE(1), (uint8_t *)"Master", CENTER_MODE); wait(2); while(1) { lcd.Clear(LCD_COLOR_BLUE); lcd.SetBackColor(LCD_COLOR_BLUE); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(0,LINE(1), (uint8_t *)"Master ", CENTER_MODE); sprintf((char*)texto, "Sensor 1 = %3d", dato); lcd.DisplayStringAt(0, LINE(2), (uint8_t *)&texto, CENTER_MODE); wait(1); } }

6 years, 5 months ago.

Gianfilippo,

Can you share a link to your project, or provide more detailed code snippets that showcase how you are getting data from the , as well as how you are printing to the LCD screen?

There is an example on how to use the MLX90614 with I2C located here. Review the wiring diagram, and make sure you can print out the temperature to the serial bus.

Next, verify that you can print data to the LCD screen. There is an example that shows how to do this here

Austin has provided you with some additional details in the last question you posted.

I've already tried all the solution i've mentioned before. Unfortunately i'm not so skilled to write in c++, and all my attempts get failed.

At the end i'm not able to visualize the temperature on LCD screen

posted by Gianfilippo Cavallo 22 Nov 2017