Programing Bot Board II Issues

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â€

Are you new to programming? By the looks of it, I don’t see any code in there that actually makes the robot (define robot) move. What robot are you trying to control?

No movement… that’s not the issue here:

lol Sorry i read it wrong.

hmm, are you using a basic stamp 2 or a basic atom? I only ask because a few months ago there was a bit of conversation from another group (hs students I think) with a similar name and they were using an atom. your syntax of the sound command suggests you are using an atom.

anyway, I thew this into the basic atom pro compiler 8.0.1.7 and it compiled without error. not sure if that helps at all. 8(

I have programmed an atom pro with this code and it compiles and programs without error. Are you using 8.0.1.8 and debug. If so you will need to stop using debug, or change to 8.0.1.7.

By the way you are posting in the basic stamp section of the forum. Not going to get much visibility here. :wink:

Moved the thread to the Basic Atom section.

Oops, thanks. Frist time using this board.