Survivor Bot 08M
PICAXE 08M Tank Based Robot

Hi Everyone!

Thank you to everyone on YouTube and the general internet community for taking such an interest in my little pet robotics project!!!

I am not an electronics genius, nor a robotics engineer... I am just a common person out in the world just like the rest of you with a keen interest in science and technology. I am absolutely amazed by how many people out there share a similar passion for this kind of stuff, and as promised I have finally found some time to post the source code to this project on the internet. A special thanks is in order for Mr. OddBot from Let's Make Robots, his little robot inspired me to create my own little robot which inturn has inspired others!

You can check out Mr. OddBots work via the following link:
Mr. Russel OddBot's Robot: http://letsmakerobots.com/node/4120

P.S. Some of the source code has been adapted from Mr. OddBot's creation / source especially when it comes to servo control. This can always be a little tricky, please check your pin outs and also your servo's might be a little different than mine (manufacturer). I have used continuous rotation servos for track / tank based movement and a standard servo for head movement.... More information will be added soon!!!

Survivor Bot 08M Source Code:

#picaxe 08m
setfreq m4

symbol motorL=4		'servo output pins 			- pin 4
symbol motorR=2		'servo output pins 			- pin 2
symbol motorN=0		'servo output pins 			- pin 0
symbol sonar=1		'output pin for ultrasonic              - pin 1

symbol distance=w6	'result from sonar
symbol distleft=w4	'distance when looking left
symbol distright=w5	'distance when looking righ

symbol blocked=25	'minimum safe distance 25cm

servo motorL,75		'set pins as servo outputs - forwards
servo motorR,175	'set pins as servo outputs - forwards
servo motorN,160	'set pins as servo outputs - center the neck

pause 2000	        'move forward a little then start main program loop

	gosub ping	    'check to see if anything is infront of the robot
	if distance>blocked then		'nothing ahead
		gosub ahead
		goto main
	end if
	gosub jump
	goto main

	low motorL,motorR
	gosub look

	if distleft < blocked and distright < blocked then
		high motorL,motorR
		gosub backwards
		gosub spin180		'path blocked - can't turn
		goto main
	end if
	if distleft>distright then				
		high motorL,motorR
		gosub turnleft
		goto main
	end if
	high motorL,motorR
	gosub turnright
	goto main

	servopos motorN,120		' turn the head to the left
	pause 300
	gosub ping
	let distleft=distance
	servopos motorN,200		' turn the head to the right
	pause 600
	gosub ping
	let distright=distance
	servopos motorN,160		' return the head to centre
	pause 300
	pulsout 1,2
	pulsin 1,1,distance
	let distance = distance * 10 / 58  ' calculation is specific to sensor used!
	servopos motorL,75
	servopos motorR,175

	servopos motorL,175
	servopos motorR,75
	pause 2000

	servo motorL,175
	servo motorR,175
	pause 1500
	servo motorL,75
	servo motorR,75
	pause 1500
	servo motorL,75
	servo motorR,75
	pause 4300
This is an empty container, it will eventually have pictures and some usefull information... sorry for this page being under construction, I don't nearly have enough time to spend on the things I enjoy... like robotics!!!

Related Keywords:

PICAXE, PICAXE-08M, PICAXE Source Code, Survivor Bot 08M, Lets Make Robots Survivor Bot 08M, Servo Control, Airbiscuity Survivor Bot

Website Links of Interest:

You Tube Film Clip: http://www.youtube.com/watch?v=2CCf1yRaKiM
Let's Make Robots: http://letsmakerobots.com/node/17898