value in mV

#TODO fix ghost caractere when under100 mV
This commit is contained in:
Rémi Heredero 2023-02-24 15:09:43 +01:00
parent 157655cbfe
commit 25d8773628

View File

@ -72,11 +72,12 @@ void main(void)
while (1) while (1)
{ {
uint16_t value; float value;
value = ADC_GetConversion(voltage); value =(float)( ADC_GetConversion(voltage)/19.859);
char* msg; char msg[16];
sprintf(msg, "%i", value); sprintf(msg, "Value : %3.1f mV", value);
// LCD_2x16_WriteCmd(0x01); // clear display
LCD_2x16_WriteMsg(msg,0); LCD_2x16_WriteMsg(msg,0);