cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying the value of a temperature on the LCD

idrissmc
Associate III

Hello everyone,

so what I’m going to do is displaying the value of the temperature on the LCD of the STM32F413H-Disco with a PT100, i wrote this code:

int value;

char getvalue[20];

...

MX_ADC_Init();

HAL_ADC_Start_IT(&hadc1); (I choose Interruption because in reality i started with a simple potentiometer so I think that if I turn it faster I have to see the right value, I don’t want that the program run all the code and then display the value, that’s why I used the interruption )

HAL_ADC_PollForConversion(&hadc1, 100);

value = HAL_ADC_GetValue(&hadc1);

itoa(value, getvalue, 10);

..

GUI_Clear();

GUI_SetFont(....);

GUI_DisplayStringAt(...);

I declared the MX_ADC_Init function

but it displays 0 on the LCD.

Clive Two.Zero can you help me to resolve this please?

thanks

10 REPLIES 10

Thank you