Let's Make Robots!

How to build your first robot - Part II - navigation


Your browser is not able to display this multimedia content.

Your browser is not able to display this multimedia content.

clean_navigation.BAS6.17 KB

This is Part II of How to build your first robot - tutorial.

you can just take the cool navigation-code in here and have fun with it, or you can follow the whole instruction, or the parts that you like. I try to make it as general and open as possible.

Here is part III of this tutorial - I recomend that you browse this as well!


You have made a robot, something like this: How to build your first robot

You have read my deep thoughts on how to move on with the programming "Don't program your robot.. Teach it!", and you have made tricks with your robot, messed around with it, had some fun and is ready to move on.

Perhaps you have tried out this little trick of seeing what your robot sees.

You have seen on the video of "Making Skiwalker", and seen on the pictures of "Yellow Drum Machine" (the pics in the bottom) - that you do not need much for materials to make a robot; Melt-glue, double sided tape, sticks, and you are go!

If so, this part II should be a breeze! You can make this robot in 45 minutes, no sweat.


First, let's make the robot on the picture above. Try to duplicate the main parts, that is the main task here.

It shuld not need much explantion, it is excaxtly like the one from How to build your first robot - only differences:

  • Instead of Sharp sensor, I use SRF05
  • The servo is a smaller one, and a fast one - you can get these in any size and speed
  • The gearing on the motors is lower, so I have a faster robot (though it is not a speed-king, lol)
  • instead of just taping it all together, I have used 3 sticks to form some sort of a "chassis"

The closer you get to this, the easier it will be to follow the rest, but of course you can just do it your way, with whatever parts you have etc.

In the first tutorial I wrote that you could make some fancy code for the robot.

I now present you for some code that I have made, it is what is used on the video. It is an example, there are thousands and millions of ways to evolve, you should do it your way. This is just to try to open your eyes, and share what I have learned after countless hours of trial and error.

Try to alter some of the numbers to tune in to your setup, and read the guidelines in the code. That way you can get a robot like the one on the video, and we are going to use that as a base for Part III in this tutorial...

Find the attached code in the top of the post.

.. And the screwdriver-trick on the video?

Well.. Look for places where the code says

servo Servopin,head

and add, just after it

servo 1,head

If you are adding another servo on pin 1.

Think about what to attach instead of the screwdriver?

Something with an LED on? And insert some on/off in the code for the LED? Or a fan? or.. :D


Stay tuned. This bot is getting more enhancements now..

And if some of the comments below does not make sense, please understand that I am changing this over time, so the comments may have been for an earlier text here :)

Thanks, and do post what robots you make, to inspire back. Thank you.

/ Fritsl

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
maybe, will try it out on the robot tomorrow to see if it works.

What ratio are the gear motors used hear? Any guesses?

I cant seem to find any lower ration gear motors for the life of me though. Are they modified?

 Can any body point me to any sites or suggest some search terms I could use?

 Looking for a lower gear ratio than 143:1 (faster than the GM9) prefferably with a right angle shaft; and if at all possible US.

Thanks for any help; sorry if I seem like a huge noob. I am. =)

This question would probably be better placed in the first part, "Start Here", where the robot is being constructed. There it talks about getting the GM9s at Hobby Engineering. And you first ask about the ratio of those used, then state the ratio later. This is the same robot as the "Start Here" robot using the same GM9 motors.

Hobby Engineering has afater, lower gear ratio motor, but it has no matching wheel like the GM9 does. May sound easy, but getting a wheel on a motor takes some time. These motors are here :


I was a bit confused about that, the GMs did look the same but I noticed up top he has bulleted "The gearing on the motors is lower, so I have a faster robot (though it is not a speed-king, lol)" So I was curious as to what he used. Thank you for your replies though!
There is no way I can remember what I used - the robot was build in some minutes, shot on video, and then used for something else :)

you could put a small video camera on the extra servo and see in your prespective what the robot see in its prespcctive.


He can also put a laser gun, rocket launcher, BB Gun, Paintball gun and a micro proximity mine dropper with autonomous detanator on it


add a paintball gun and a sensor that could track a target and that would be one hell of a fun toy !!!!!!

"He can.."?

YOU can ;)

It is a tutorial ;)

can i have your email because i have a lot of questions to ask you

or you can add me my email is khalchris@hotmail.com

please i need any help avaliable