Site hosted by Angelfire.com: Build your free website today!

This is the program that is loaded on the BASIC Stamp that tells it what to do with the signals

 

'{$STAMP BS2}

output 0

output 1

output 2

output 3

output 4

output 5

output 6

 

input 9

input 10

input 11

input 12

input 13

input 14

input 15

 

start:

out0 = in12

out1 = in13

out2 = in13

out3 = in12

out4 = in8

out5 = in9

if in10 = 0 then mag

if in14=0 then left

if in15=0 then right

debug ? in15

goto start

 

right:

out0=0

out1=1

out2=0

out3=1

if in15=1 then start

goto right

 

left:

out0=1

out1=0

out2=1

out3=0

if in14=1 then start

goto left

 

mag:

toggle 6

pause 1000

goto start