Hello.
I'm trying to display in a LCD 16x2 the data temperature from TMP112. So far I've got this:
temper=ReadByte();
SendAck(1); // SDA low -> more data to come
temper2=ReadByte();
SendAck(0); //SDA high
temperature=temper+temper2;
var=temperature/16;
var2=temperature%16;
And then the display shows:
printf("Temperature: %d.%d", var,var2);
I'm not sure if this is right. I've the data temperatura from TMP112 at temper and temper2 and then send both to temperature and display the integer part first and the rest of division after.
Can someone tell me if I'm doing this right?
Thanks.