LightMeter.bs2 program troubles. HELP!!!!!!!!!!
trekspert42
Posts: 4
hey everyone, new here and i've got a problem with the LightMeter.bs2 program using the 7-seg LED display. for some odd reason, when i click run, a pop-up come up saying "expected a label", and it has the second index highlighted when it is trying to update the disply in the program . i made sure it wasn't my computer or the board, and i have everything typed in correctly. what is up?!?!?!?!?!
Comments
' {$STAMP BS2}' {$PBASIC 2.5}' What's a Microcontroller - LightMeter.bs2' Indicate light level using 7-segment display.DEBUG "Program Running!"index VAR Nibtime VAR WordOUTH = %00000000DIRH = %11111111DO GOSUB Get_Rc_Time GOSUB Delay GOSUB Update_DisplayLOOPGet_Rc_time: HIGH 2 PAUSE 3 RCTIME 2, 1, timeRETURNDelay: PAUSE timeRETURNUpdate_Display: IF index = 6 THEN index = 0 LOOKUP index, [ %01000000, %10000000, %00000100, %00000010, %00000001, %00100000 ], OUTH index = index + 1RETURNWhere its highlighted in red is where im having issues. im using the BS homework board. When i hit run, a message pops up and says "expected a label". it also highlighted the word indexwhich i italicized above. What is happening???
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
index VAR Nib
time VAR Word
OUTH = %00000000
DIRH = %11111111
DO
GOSUB Get_Rc_Time
GOSUB Delay
GOSUB Update_Display
LOOP
Get_Rc_time:
HIGH 2
PAUSE 3
RCTIME 2, 1, time
RETURN
Delay:
PAUSE time
RETURN
Update_Display:
IF index = 6 THEN index = 0
LOOKUP index, [ %01000000,
%10000000,
%00000100,
%00000010,
%00000001,
%00100000 ], OUTH
index = index + 1
RETURN
-Phil