Little tank bot

This is a variation of the first bot using a tank chassis 

object avoidance

  • Actuators / output devices: micro gear head motors
  • Control method: autonomous
  • CPU: Picaxe 28x1
  • Operating system: Picaxe
  • Power source: 4 AA batteries
  • Programming language: Picaxe basic
  • Sensors / input devices: Sharp IR
  • Target environment: indoor

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/little-tank-bot

Nice Robot!!!

small and compact robot.

Nice !! :slight_smile: Pleas post more

Nice !! :slight_smile: Pleas post more photo.  Thanks :smiley:

Thanks!

Thanks!

Thanks, posting more

Thanks, posting more pics

I also moved the servo off the top of the chassis to the front so it can detect lower objects in its path

**can you please post more stuff **

hi

can you please post more pictures and circuit diagram of this project . if you have programing as well can you please post that aswell . i am want to make this project .

looks great

I really like how compact the design is. Great job!

Cute!

Small, cute and compact! Like It! :slight_smile:

Another request for more info.

Yep, more photos would be great.

I can’t see how you’ve got a 4xAA holder and the motors under the Picaxe PCB.

here is the code

 

this is more or less a blatent rip off of the start here bot code with some very minor modification.

BTW I want to learn C for arduino does any body have this basic functionality in arduino C I could look at?

 

 

Symbol distance = 70 ’ are we going to run into something?

symbol turn = 200 ’ chassis turn duration

symbol servo_time = 200 ’ how long for server to turn ir sensor

 

main: ’ the main loop

readadc 0, b1 ’ how far is the closest obstacle

if b1 < distance then

gosub allclear ’ clear to move forward

else 

gosub direction ’ if obstacle ahead then decide which way is better

end if

goto main ’ end loop

 

allclear:’ both motors forward

high 4 : high 7 : low 5 : low 6

return

 

direction:

gosub totalhalt ’ stop all motors

 

'look left

gosub lturn ’ look to one side

pause servo_time ’ wait for servo turn

readadc 0, b1

gosub totalhalt

 

'look right

gosub rturn 

pause servo_time ’ wait for servo turn

readadc 0, b2

gosub totalhalt

 

’ Decide which is the better way:

if b1<b2 then

gosub body_lturn

else

gosub body_rturn

end if

return

 

body_lturn:

high 6 : low 5 : low 7 : high 4 ’ right motor forward left motor backward

pause turn : gosub totalhalt

return

 

body_rturn:

high 5 : low 6 : low 4 : high 7 ’ left motor forward right back

pause turn : gosub totalhalt

return

 

rturn:

servo 0, 100 ’ turn servo right

return

 

lturn:

servo 0, 200 ’ turn servo left

return

 

totalhalt:

low 4 : low 5 : low 6 : low 7 ’ stop all motors

Servo 0,150 ’ servo center

wait 1 ’ wait 1 secd

return

 

I used this little

I used this little chassis 

 

http://www.pololu.com/picture/view/0J3928

http://www.pololu.com/picture/view/0J3933

You asked about basic SHR arduino code.

Check out ignoblegnome’s Penny 

Thanks!

Thanks!