Hey trying to put this test program on the Bot Board II to test an IRPD, when it detects something instead of moving a robot its basically going to give off a tone instead. However the code is not working, below is the the code and then what it says when I debug it, any information would be useful, thank you,
Program:
[code]'IRPD test Program
'Note still working kinks out with the command ‘branch’.
templ var bit
tempr var bit
action var nib
pause 1000 'let IRPD settle
start:
templ = 0
tempr = 0
high 13 : pause 1
templ = in12
low 13
high 14 : pause 1
tempr = in12
low 14
action = 0
if templ = 1 then cont1
action = action + 1
cont1:
if tempr = 1 then cont2
action = action + 2
cont2:
'action = 0, nothing in the way
'action = 1, something on front left side
'action = 2, something on front right side
'action = 3, something in front
branch action, forward, turn_r, turn_l, backup ]
forward: 'nothing there, does nothing
pause 1000
goto start
turn_r: 'something to left, give off tone
sound 9, 150\2500 ]
pause 1000
goto start
turn_l: 'something to right, give off tone
sound 9, 150\3000 ]
pause 1000
goto start
backup: 'something infront, give off tone
sound 9, 150\3500 ]
pause 1000
goto start[/code]
This is the error:
“Starting Compiler…
Preparing files…
C:\DOCUMENTS AND SETTINGS\R&D 3\DESKTOP\SARAH’S STUFF\032109\IRPD TEST PROG. VER 3.BAS
Compiling…
Tokenizing…
c:\documents and settings\r&d 3\desktop\sarah’s stuff\032109\irpd test prog. ver 3.asm: Assembler messages:
c:\documents and settings\r&d 3\desktop\sarah’s stuff\032109\irpd test prog. ver 3.asm:793: Error: Symbol _LN00000_00015 already defined.
c:\documents and settings\r&d 3\desktop\sarah’s stuff\032109\irpd test prog. ver 3.asm:819: Error: Symbol _LN00000_00019 already defined.
C:\PROGRA~1\BASICA~1\bin\ld.exe : cannot open c:\documents and settings\r&d 3\desktop\sarah’s stuff\032109\irpd test prog. ver 3.o: No such file or directory
Errors Detectedâ€