Printing Variables on a 2x16 LCD
IpreferJava
Posts: 1
Hi Forum!
this is my first time on this website, and i was wondering if any could help us on our school project.
Our school project dictates us to get a temperature from a DS1620 chip and print it on a 2x16 LCD screen.
We were given 2 programs to combine. One that reads the temperature, the other that runs the LCD screen.
All in all it seems like we got it, UNTIL we ran into the problem of getting the temperature variable to print on the LCD screen.
Can anyone help?
~Thanks!
the noobs.
P.S. our code is attached.
this is my first time on this website, and i was wondering if any could help us on our school project.
Our school project dictates us to get a temperature from a DS1620 chip and print it on a 2x16 LCD screen.
We were given 2 programs to combine. One that reads the temperature, the other that runs the LCD screen.
All in all it seems like we got it, UNTIL we ran into the problem of getting the temperature variable to print on the LCD screen.
Can anyone help?
~Thanks!
the noobs.
P.S. our code is attached.
Comments
With strings, you're going to have to do them one character at a time, so "Hello" becomes: output "H", output "e", output "l", output "l", output "o". For numbers it's a little harder. To output the digits of a number, use value DIG digit where digit is the power of 10 of the digit from value. If you want to output numbers from 0000 to 9999 from value, you'd get: output (value DIG 3)+"0", output (value DIG 2)+"0", output (value DIG 1)+"0", output (value DIG 0)+"0".
By output, I mean whatever code you need to send a character to the display. Lookup the DIG operator in the Stamp Manual or the Stamp Editor's on-line help for details.