This program is for anyone with a parallax boe bot. The rest of this article won't make sense if you don't have one.
All the news that's fit to assimilate
[ Home | Blogs | Events | Robots | Humans | Projects | Podcasts | About | Account ]
This program is for anyone with a parallax boe bot. The rest of this article won't make sense if you don't have one.
Diagram- out15= Light Emiiting Diode out12= Servo Motor out13= Servo Motor out10= Piezo Speaker out1= Infrared emitter {not shown on initilization} pin0= Infrared detecter
The gosubs- marked by *, are to be filled in with f, b, r, l, or z. f=forward, b=backward, l=left, r=right, and z= look for object. You can activate the gosubs by hitting ctrl+r or by clicking run. Contact Scienceboy 2 for more info.
lt con 500 rt con 1000 f1 con 1000 f2 con 500 r1 con 500 r2 con 1000 output 15 output 12 output 13 output 10 output 1 input 0 go con 100
pc var byte
program: gosub * gosub * gosub * gosub * gosub * freqout 10, 100,2500 out15=0 stop
target: for pc = 0 to 15 out15=0 freqout 10, 50, 2500 pause 50 out15=1 freqout 1, 1, 38500 if in0=0 then hit next debug " Target Missed. DANG IT! " freqout 10, 1500, 3000 return
l: for pc = 0 to go pulsout 12, lt pulsout 13, lt next debug " Left turn completed, awaiting further command " return
r: for pc = 0 to go pulsout 12, rt pulsout 13, rt next debug " Right turn completed, awaiting further command " return
f: for pc = 0 to go pulsout 12, f1 pulsout 13, f2 next debug " Forward thrust executed, awaiting further command " return
b: for pc = 0 to go pulsout 12, r1 pulsout 13, r2 next debug " Reverse thrust executed, awaiting further command " return
z: freqout 1, 1, 38500 if in0=0 then target freqout 10, 1000, 2500 debug " Target scan negative " return
hit: debug " Target Destroyed. Awaiting further orders " freqout 10, 500, 5000 stop
note- on this article, the alighnment is messed up. If you think this program is worth 2 cents, then email me at kwentworth@characterlink.net for me to email you a correected copy. Thanks for your time.
Follow us on twitter
Become a fan on facebook
Subcribe to our RSS feed
2011 Top 10 Robot Christmas Gift Ideas
Review: Apocalyptic AI by Robert M. Geraci
Raspberry Pi Interview with Eben Upton
Review: Robotics Programming 101
2011 VEX Robotics World Championship
Giant Dallas Robot Cited as Best Public Art
There's More Than One Way to Skin a Robot
Polulu 3pi: the 10,000 Mile Review
Day of the Androids at Hanson Robotics
Machinima Review: Stolen Life