How to build your first robot - Part II - navigation

Thanks for your reply

Thanks for your reply my friend ,got it work.

SRF05

I’ll building this with my 11yo daughter as our first robot.  I’ve been studying the code for the last week waiting for the parts (kit purchased from Solarbotics, SO helpful).  The SRF05 didn’t come with a cable.  I was thinking of soldering header pins on the board.  Would that be good or would you recommend soldering wires directly to the board?

Thanks for the tutorial.  We’re very excited about getting this going!

Header pins and

Header pins and female-to-female wires. Absolutely.

That way you can take it apart and build something new; You have made yourself a kit :slight_smile:

Have fun, cheers.

it was a big help

it was a big help

Great robot and even better

Great robot and even better code. I’m thinking about using this code for my bot

But I am having trouble

But I am having trouble getting the code.

for making this robot would

for making this robot would I need to hook the srf05 up here: https://www.robotshop.com/letsmakerobots/node/66 and still use the same code or is that the only place you can hook it up any way.

Different hardware = different software

The parts in the code that relate to the sensor will be different, because your sensor hardware is different. Doesn’t that node 66 give example code for Picaxe?

In a nutshell: the ultra sound sonars need a pulse to transmit and then measure time until the echo. The SRF has different ways of offering it measurement to you. Time to start reading your manuals!

no I mean the code at the

no I mean the code at the top of the page.

 

** the code**

ok i have read the code and have quite a few questions;

what is the mayturn variable i dont see any use for it but it says to add one after every turn and take one when you go to an interesting place the notes at the top say undocumented variable?

after PHASEA1 it just goes back to the rest of the code and never goes onto the rest of the code also when your robot in the video has nothing infront of it it seems to look left and right to dodge things in the code i cant see where it says to do this?

and finally

in Sharp_R: it says If head < ForwardLeft and head => 75 then

head = head + 30

pause 50

servo Servopin,head

but it only goes to Sharp_R: if the head is already pointing completley to the right so that wouldn’t happen and any way if you just turned right into a space and saw a space on your left why would you turn right?

 

this may just seem like i am criticising it but i want to either write my own code or fully understand the code i am using to help me learn to write other programs in the future

thanks alot :slight_smile:

-

 

 

Where can i get that metal

Where  can i get that metal cover for the srf05?

metal cover

Where do you get the metal cover for the range sensor?

Google Videos

Google has shut down google videos and bought Youtube, the videos are not working. :smiley: and D: