How to build your first robot - Part II - navigation

ty guys, great effort…i

ty guys, great effort…

i hope we can do it by the voice…it will be more easy to use it by webcam too. then we can contact our robots with our eyes…like (eyetwig)software…

cu

what is the model of the
what is the model of the servo you use?

I would not know, sorry.
I would not know, sorry. "Small blue 9g servo", that is all I remember.

AA batteries
Can we just use 3 batts

yes
yes

BTW!
I meant as in 3 aa batteries. and does it have an effect on the performance.

Yes you can use 3 AA

Yes you can use 3 AA batteries…although for me it affects the performance of the motors…so i use a 2nd power supply…u can search it here it the forum…its quite easy…

 

whew i remember my first time :slight_smile:

WOOD DIMENSIONS
Does an anybody (frits) know the dimensions of the pieces of wood??

I do not have the robot here

I do not have the robot here where I am now, but later i can find it for you.

However, please allow me to ask; Why do you mind? The point is (I should think) not to make a replica of my robot, but to learn how to make something yourself.

By "making something yourself", I mean that being able to find some wood, and make a robot out of it, glue it togeter, cut it, make it work, you know :slight_smile:

Balace
I was concerned that it may affect the blance

Don’t worry about that! i have another worry!

I was wondering about the speaker. I am using a mylar speaker and I need to know where to solder that speaker. DESPERATE HELP! I’m almost finished this robot and its my FIRST ONE!!! All help appreciated.

BTW il probably post fotos.

HS-55
its the Hitec HS-55. im sure.

CODE!!!

With the clean_navigation code, I seem to have a problem. At the beginning, when I turned it on, the servo jiggles around a bit and then the wheels turn and nothing happens. No sensor pulse (from the led). But the sensor definitely works because when I used that sensor code in part 1 , the led started flashing. Its finished, fully built but I NEED HELP WITH THE CODE.

btw, the wheels go on and on and after a while, the servo jiggles again.

//nerdz1

IR Sensor

Hi Fritsl

Another great robot and tutorial :slight_smile:

I have just a few questions I hope you can answer.

1) Should the clean navigation code work with the exact robot in the start here tutorial 1?
I have tried it but with no luck. I guess it is because I am using IR Sensor GP2D12? Can you advise on code modification for this?
When I run the program the head moves to the left then it steps to the right (2 small steps) then it moves left again (1 small step) and at this point the wheels rotate forwards, and this is how it stays.

2) Line 202 gives me a syntax error
201- totalhalt:
202- low 4, low 5, low 6, low 7
203- return
I got rid of the error by changing the comma’s to colon’s (low 4 : low 5 : low 6 : low 7)
I ask this because you say that the code is exact as entered in the program and I would like to understand why I get the error.

Thanks again for all the great work you do here

 

Just use the old code

Just use the code in Pt1. Yes you are right. It doesn’t work because of the code. It is made for the SRF05. The SRF05 has inputs and outputs blah blah. And for once … Frits got it wrong. It’s supposed to be low 4 : low 5 : low 6 : low 7. And if you want to use this code, you probably need an SRF05 and most likely, an SRF05 mounting brackets.

//newtonl

PS. If you need the mounts, if you are in America, I recommend Lynxmotion or Trossen Robotics.

… And this is my first post that help sombody :smiley: :smiley: :smiley:

OH!!
and I fixed my code problem.

1) No, the code should be

1) No, the code should be adapted. It is not very often that you can take code from one robot and use it in another without modifications. Alone how you hooked up your motors will affect stuff.

If you use the sharp, you will have to adapt. And note that as far as I remember, the shapr returns higher values the closer an object comes. The SRF05 standard routine returns lower the closer :slight_smile:

3) The editors are a little different on this, you can use low 4 low 5 low 6 low 7

or

low 4
low 5
low 6
low 7

or

low 4 : low 5 : low 6 : low 7

point is to set all them ports low :wink:

 

Mostly I think you should understand the code, and then adapt it to your own project. It is the principle of looking around while driving, then acting if… that is the point here :slight_smile:

how pixace work
how pixace work

My first robot.

Hi frits,

I’ve built this robot as my first one. First I downloaded the clean_navigator in the 28X1. The SRF05 turns from one side to the other than stops in the center only once,then the wheels are going backwards. The sonar doesn’t detect objects and consequences are that there is no direction changes on the wheels.

I’ve done the SRF05 range test and it’s ok. I also checked the motors polarities and directions according to the clean_navigator (forward ,reverse,spins and slides) and it’s ok. I’ve been trying to study the code as much as I can but I don’t find the problem. Hope you could give me a hint on that one,it would be appreciated from you. Thanks for your help and keep up the great work.

Code

You must adapt the code to your own hardware inputs and outputs.