I'm trying to print to my LCD that's on I2C, but i'm trying to have it print a value from a temp sensor also on I2C. What i'm trying to figure out is if i can just send the LCD a variable defined earlier in the program, and have it display the value. Thanks.
I would like to know as well. Have not programmed in a long while and have a LCD sitting here telling me how long it has been running but I have not got a clue on where to go with the code to do what I want. :-X
Guys this will depend on your i2c lcd module and what it supports.
Your problems is going to be that you have a value stored in a variable (say 128) and you want to display that variable on the lcd (so 128 comes up on the lcd)
the issue is that in order to display "128" you will need to send three characters to the lcd. ASCII 1 ASCII 2 and ASCII 8. (33,34 and 40 in decimal)
So your program will need to take the variable (128) and convert it to ASCII before sending to the i2c lcd.