My first robot

Posted on 05/02/2008 by fritsl
Modified on: 13/09/2018
Project
Press to mark as completed
Introduction
This is an automatic import from our previous community platform. Some things can look imperfect.

If you are the original author, please access your User Control Panel and update it.

UPDATED: Code on how to make this sort of navigation inserted below.   My first robot! I did not have a clue to all the stuff you can buy, and so I thought I was the only one in the world making Robots, and was inventing eveything from scratch..   But.. I actually managed to make some pretty cool code, quite nice navigational system that I have been using in many projects afterwards:   Basics of the code: Main routine:Drive ahead!Pan head from left to right, and backConstantly return sonar ...


My first robot

UPDATED: Code on how to make this sort of navigation inserted below.


 

My first robot!

I did not have a clue to all the stuff you can buy, and so I thought I was the only one in the world making Robots, and was inventing eveything from scratch..

 

But.. I actually managed to make some pretty cool code, quite nice navigational system that I have been using in many projects afterwards:

 

Basics of the code:

Main routine:

Drive ahead!
Pan head from left to right, and back
Constantly return sonar range

When facing green areas:
if sonar range > “interesting” (if there is no obstacles even faaaaar away, an open door or similar to make us curious) and if we did not just do this several times already without seeing anything close, then stop turning head, and start to turn body till head faces an obstacle, or just something far away, or body-turning has ben done for a while. Then continue in main routine

When facing red areas:
if sonar range < “danger” (if something is close in front of us), and head is turned more left than right (in this example):
Turn body a little to the right (away from danger) while turning head a little to the left (towards the danger) - Keep this up until head is in green area, and then continue in main routine

 

 


1.000 pics, sorry if this is too much, but I was so much in love ;)

 

 

 


Thanks for asking about the code. i have made a simplified version (without all the extras of this particular robot), just the navigation.

 

Hardware setup needed for this to turn into something:
1 "Picaxe robot":
2 motors on a motor-driver
1 servo, on which is mounted 1 SRF05

The code below will make this setup navigate like my first robot, featured in video above - you can use belt-track or just a robot on 2 wheels - same code.

Feel free to ask or comment & have fun :)

CODE BEGIN:

 

EEEH! EEEH! EEEH! ALERT: Since this code is now slowly becoming a "standard" base for quite many projects, I am only updating it one place, you can find the latest version here from now on :)

Drives around and navigates via ultra sound sensors mounted on a servo. Also shoots "laser" and make sounds :)

  • Actuators / output devices: 2 servos, 2 geared motors, led's, speaker
  • CPU: Picaxe 28
  • Operating system: Picaxe
  • Power source: 7, 2V 33Mha Racing Pack, 3 AA cells
  • Programming language: Picaxe basic
  • Sensors / input devices: SRF005, bumper, Tilt sensor
  • Target environment: indoor, outdoor
LikedLike this to see more

Spread the word

Flag this post

Thanks for helping to keep our community civil!


Notify staff privately
It's Spam
This post is an advertisement, or vandalism. It is not useful or relevant to the current topic.

You flagged this as spam. Undo flag.Flag Post