PDA

View Full Version : LCD Display help trying to show and array



grasshopper
05-20-2008, 02:47 AM
Whats wrong with my code I want to simply display the array named "LM_TEMP" it is not displaying the correct data.





VAR
LONG LM_TEMP[7]

OBJ
LCD : "LCDDEMO"


PUB DISPLAY | X

LM_TEMP[ 0 ] := "1"
LM_TEMP[ 1 ] := "2"
LM_TEMP[ 2 ] := "0"
LM_TEMP[ 3 ] := "."
LM_TEMP[ 4 ] := "0"
LM_TEMP[ 5 ] := "0"


X := 0

LCD.CLS

LCD.writestr(@escapechar1) 'Display the characters 0-7

REPEAT X FROM 0 TO 5
LCD.writeOut(LM_TEMP[ X ]) ' Write a single character at the current position

LCD.writestr(@escap) 'Display the characters 0-7

LCD.writestr(@escapechar2) 'Display the characters 0-7



DAT
escapechar1 byte "Holder = ",eos
escapechar2 byte "Target = 50.00 ",$DF,"C",eos
escap byte " ",$DF,"C",cr,eos





Please help

grasshopper
05-20-2008, 02:50 AM
SOLVED, sorry I am quick to ask for help. I had the array in a different pub and did not call on it.