Display variable at LCD dispaly
hclam
Posts: 5
Hi all,
Im using the command line below to display the constant at the LCD display:
SEROUT TxPin, Baudrate19200, [noparse][[/noparse]"123"]
Can somebody tell me how to display the variable value at the LCD display? Tq
Im using the command line below to display the constant at the LCD display:
SEROUT TxPin, Baudrate19200, [noparse][[/noparse]"123"]
Can somebody tell me how to display the variable value at the LCD display? Tq
Comments
You do it the same way that you displayed the constant:
Variable var byte
Variable = 123
SEROUT TxPin, Baudrate19200, [noparse][[/noparse]"123"]
SEROUT TxPin, Baudrate19200, [noparse][[/noparse]Variable]
Both the PBASIC Stamp Manual, and the PBASIC Stamp Help file are wonderful resources that you might consider using.
Regards,
Bruce Bates
· SEROUT Lcd, Baud, [noparse][[/noparse]DEC myVar]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I do try out with the solution from all of you, it is work now but it seem like not able to display the floating digits, eg 12.35. What command need to include for displaying floating digit?
Tq
· SEROUT Lcd, Baud, [noparse][[/noparse]DEC (myValue / 100), ".", DEC2 myValue)
Here's a hint: a serial LCD can use any of the serial modifiers supported by SEROUT and DEBUG -- so you can use DEBUG to do quick tests before putting code into the program that uses the LCD.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax