Projects › Projects › Distance measurement using InfraRed sensor › Hello sir, I’m performing
Hello sir, I’m performing one of the project Distance measurement Distance measurement using InfraRed sensor. I was working on the concept of the program and could’nt get along with this part of the program.i am so confused this convert function.Because this HEX to ASCII conversion couldn’t understan me.Pls explain ths logic as early as possible….
Thank you in advance…
void convert()
{
int s;
lcd_cmd(0x81);
delay(2);
lcd_data_string(“output:”);
s=test_final/100;
test_final=test_final%100;
lcd_cmd(0x8a);
if(s!=0)
lcd_data(s+48);
else
lcd_cmd(0x06);
s=test_final/10;
test_final=test_final%10;
lcd_data(s+48);
lcd_data(test_final+48);
lcd_data(‘ ‘);
if(shift>16)
{
lcd_cmd(0xc0+(shift-1));
lcd_data_string(” “);
shift=0;
}
lcd_cmd(0xc0+(shift-1));
lcd_data(‘ ‘);
lcd_cmd(0xc0+shift);
lcd_data_string(“CALIBRATE IT”);
delay(30);
}