How to build your first robot - Part II - navigation
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!
Progress:
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


Yeah!
A great Robot Frits! It looks even easier to build than the one you presented in part 1. And the picture is so well done, how do you do that? It almost looks like product placement.
We don't stop playing because we grow old, we grow old because we stop playing.
Thanks :)It was just my
Thanks :)
It was just my mobile, and I just put it on a printer, and a lamp on the side.. 2 seconds, first shot :D
http://letsmakerobots.com/node/142
/ Frits
Looks like another great
Looks like another great introduction robot from the frits :-).
I have got to get me some of those small servos - neat! Already I'm fantasizing about a servo arm on my radio controlled arm to pick up stuff :-).
- Jimmy
some leds for eyes and a
some leds for eyes and a piezo for when the sensor runs into "DANGER" would make it come to
life even more! Great Job man!
Man, your behavior seems
awsome
That was pretty kewl ! i havent made a robot yet but im etremely enthusiastic.
loved the music by the way
where did you get that small
My local RC-shop :)It is a
My local RC-shop :)
It is a very common servo-type!
/ Fritsl
do you have any details
Erh.. No - it is a very,
Erh.. No - it is a very, very standard servo. 9 grams, as I recall it - but look anywhere they sell servos, they have it :)
/ Fritsl
If you want a model number,
If you want a model number, the servo in the picture looks really similar to the HiTech HS-55's I just picked up yesterday. I'm sure there's a lot of these 'feather' or 'micro' servos that look similar, but that's one model number you can go look for at the hobby shop.
Dan
thanks, i was able to find
one little coment.
just about 52 seconds into the video how come the robot misses the box by like mills. or is that really advanced navigational techneiques only for like fristz and what not.
Just good code :)Download
Just good code :)
Download and try (when you get a job so you can buy the parts for a robot, I know;)
/ Fritsl
What is this "Case" Command?
I was wondering what the "case" command was in the code for this robot... It is under the right spin and left spin commands. I can't find it in any standard Basic code and I don't see it anywhere else! Tell me about the spin right, spin left stuff.
Thanks
www.rocketbrandcustom.com baby!!
Huh? Not in your picaxe
Huh? Not in your picaxe manual?
Page 139 in the manual
/ Fritsl
O.k I found the code...
I don't understand what variable it is... What is it "reading"? --If "case" is 0-50 etc. what is "case" I still don't get it.
ww.rocketbrandcustom.com baby!!
I think I got it...
those are my 3 choices, right? I select one to match my robots hardware -like setting up the input and output pins, right?
ww.rocketbrandcustom.com baby!!
Wroong!/ Fritsl
Wroong!
/ Fritsl
RTFM as they say.. :)
RTFM as they say.. :) Seriously - I'd rather just copy paste from the manual than inventing my own ways of explaining.. but why don't you read it? Send you link, no? :)
It is instead of 3 times If.. Then..end if. Then it is just Select case - if "range", the variable is this, then this, if it is this, then this etc..
Try to right-click on the code-file, download, open in your editor, see what is highlighted..
/ Fritsl
Damn!
Well, shoot... I thought Ihad it! - My first fr05 robot is done, code installed, input pins all right and it is a little "stupid". -Still missing a few walls and such. I guess at this point it has got to be the sensor ranges. And I thought I had them all about right! I ran the fr05 by itself with a debug and checked all the values, plugged in what I thought were good distances... I dunno just some more tweaking i guess. Thank you soo much for all the help.
www.rocketbrandcustom.com baby!!
Looking forward to see yor
Looking forward to see yor new SRF05-robo!
/ Fritsl
Much much faster, because of
Lol I reread that,
Lol I reread that, confusing, nvm I mean could you give a link to the servos used?
Anything that can happen, will.
There is only one servo on
There is only one servo on the robot on this page. - And if you read part III you will see that it was crap :)
No link, for once it was my local shop that actually had a part.
I see you ask a lot about servos everywhere - perhaps start a forum topic about it, ask in general what you'd like to know? That way all info is the same place, also for the next person in your place. perhaps name the forumtopic something like "Info about servos" or something, so it makes sense for the next one searching "info on servos"
Thanks,
/ Fritsl
Good Idea, will do
Good Idea, will do
Anything that can happen, will.
great work
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
thanks
Please click on my picture,
you could put a small video
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,