finish reading voltage
This commit is contained in:
parent
d9c91bdcb0
commit
9c30b42e77
@ -44,6 +44,7 @@
|
||||
#include "mcc_generated_files/mcc.h"
|
||||
#include "lcd/lcd.h"
|
||||
|
||||
#define MAX_COL 16
|
||||
/*
|
||||
Main application
|
||||
*/
|
||||
@ -75,8 +76,10 @@ void main(void)
|
||||
float value;
|
||||
|
||||
value =(float)( ADC_GetConversion(voltage)/19.859);
|
||||
char msg[16];
|
||||
sprintf(msg, "Value : %3.1f mV", value);
|
||||
char msg[MAX_COL+1];
|
||||
|
||||
snprintf(msg, MAX_COL+1, "Value : %3.1f mV ", value);
|
||||
|
||||
//LCD_2x16_WriteCmd(0x01); // clear display
|
||||
|
||||
LCD_2x16_WriteMsg(msg,0);
|
||||
|
Reference in New Issue
Block a user