Writing numbers to the LCD
I was trying to do the challenge problem of Stampworks experiment
#28. I ran into a problem into writing the temperature LCD. I used
code from experiments #12 and #18. I did not change any code from
experiment #28. I did modify #12 to create the degree symbol. I was
able to output that onto the LCD. I was not able to output the value
of the temperature. Any help would be appreciated.
Sincerely,
RP
#28. I ran into a problem into writing the temperature LCD. I used
code from experiments #12 and #18. I did not change any code from
experiment #28. I did modify #12 to create the degree symbol. I was
able to output that onto the LCD. I was not able to output the value
of the temperature. Any help would be appreciated.
Sincerely,
RP
Comments
When I have to display numbers, I use an array of characters.
text VAR byte(16)
Then, I prepare the text :
for i=0 to 15
lookup i,[noparse][[/noparse]"Temperature : "],text(i)
next
Finaly, if 'TEMP' is the variable containing the temperature, I use the DIG
function :
text(13)=48+(temp dig 1)
text(14)=48+(temp dig 0)
48 is the ASCII code of '0'. So if the temperature is 25, you get 50 and 53,
which are the codes for '2' and '5'
You just have to send the text array to the display (depending on the model
you have, serial / parallel)
Hope this helps...
Best regards,
Phil.
Original Message
From: <rpsu279@y...>
To: <basicstamps@yahoogroups.com>
Sent: Sunday, September 09, 2001 5:29 AM
Subject: [noparse][[/noparse]basicstamps] Writing numbers to the LCD
> I was trying to do the challenge problem of Stampworks experiment
> #28. I ran into a problem into writing the temperature LCD. I used
> code from experiments #12 and #18. I did not change any code from
> experiment #28. I did modify #12 to create the degree symbol. I was
> able to output that onto the LCD. I was not able to output the value
> of the temperature. Any help would be appreciated.
>
> Sincerely,
> RP
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>