doesn't the demo show that with the contrast and backlight stuff ?
what have you tried ?
doesn't the demo show that with the contrast and backlight stuff ?
what have you tried ?
Warning I'm not a teacher
I havent tried the demo. Just download the txt.
As far as i understant it is using the command
ARRAYWRITE BUFF [dec C,0]
LCDSTR x,y, buff
i tried and it worked.
a = 1
b = 2
c = a+b
Last edited by astanapane; - 29th August 2020 at 10:03.
have you read the pbp manual and understood the syntax for
Output Modifiers for Formatting Strings using arraywrite ?
its all there
Warning I'm not a teacher
Hi Richard,
my fault, yes i have read the arraywrite - arrayread command and corrected the code in my previous edited message.
Many thanks.
i have a question regarding the library and the code for the nokia 3310.
for the following code:
VAR1 is a byte and VAR2 is a byte as well. Those two numbers are presenting the Speed in format VAR1,VAR2 (where VAR1 can be any number from 0 to infinity, and VAR2 can be any number from 0 to 99)Code:ARRAYWRITE speed [dec var1,dec2 var2,0] LCDSTR x,y, buff
In case that the VAR1 gets the variable from 0 to =<255 the it can be used as a byte.
My problem is that i need this floating number for ex. speed = 50,86 to get it as an integer speed = 5086. May i have your help please?
If i set speed (VAR1 VAR2) as word then the following command
does not accept word.Code:LCDSTR x,y, speed
Could you please help me to get the speed as an integer and read it as it is.
For my program i'm testing:
thanks once again.Code:if speed is > 5086 then limit ; 50,86
Last edited by astanapane; - 4th September 2020 at 10:18.
i will start here
you do it exactly the same way as for a lcd displayMy problem is that i need this floating number for ex. speed = 50,86 to get it as an integer speed = 5086. May i have your help please?
Code:buff var byte[6] ; 4dig+dp+null speed var word ARRAYWRITE buff,[dec2 speed/100,".",dec2 speed//100 ,0] LCDSTR x,y, buffcorrect lcdstr str buffer var ,const strLCDSTR x,y, speed
does not accept word.
from the inc file
;################################################# #################
USERCOMMAND "LCDC" ;X,Y,CHR 0 < X < 84 , 0 < Y < 7 , 31 < CHR > 127
USERCOMMAND "LCDCLR" ;clear LCD
USERCOMMAND "LCDSTR" ;STRING @ X,Y or Constant String
USERCOMMAND "LCDCMD" ;cmd BYTE TO LCD
USERCOMMAND "LCDDAT" ;DATA BYTE TO LCD
i might preempt the next question
leading zero's and right justifying fields
http://support.melabs.com/forum/picb...strtok-usercmd
Last edited by richard; - 4th September 2020 at 11:03.
Warning I'm not a teacher
im not in front of the circuit and computer in order to test it.
i havent done it as it following /100 and //100 (remainder)
I have used it with "." like the following in the loop and i get it right on the LCD as 50,86 for example. :Code:buff var byte[6] ; 4dig+dp+nullspeed var word ARRAYWRITE buff,[dec2 speed/100,"."dec2 speed//100 ,0] LCDSTR x,y, buff
I need on the screen the right "floating" value.
then i send the code to sub labelCode:ARRAYWRITE speed [dec var1,".",dec2 var2,0] LCDSTR x,y, speed
speedlimit:
and i havent used "."
i sent the command like:
having that it was not possible to use speed as word.Code:ARRAYWRITE speed [dec var1,dec2 var2,0]
Bookmarks