Author Topic: 3 in 1 Robot Avoiding an Obstacle  (Read 4559 times)

0 Members and 1 Guest are viewing this topic.

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
3 in 1 Robot Avoiding an Obstacle
« on: March 13, 2008, 09:28:27 PM »
[youtube]s2mQnaw49JA[/youtube]

Playing around with the 3 in 1 Robot to avoid obstacles

the sonar sensor used is Parallax PING.

Click the picture in my signature or visit erobots.blogspot.com for more info on building your own 3 in 1 robot

,Eric
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,430
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
Re: 3 in 1 Robot Avoiding an Obstacle
« Reply #1 on: July 07, 2008, 11:02:10 AM »
I just bought a parallax ping and I am wanting to make it work with my $50 robot, but can't think of how it should be coded.

Do you have any source code?

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: 3 in 1 Robot Avoiding an Obstacle
« Reply #2 on: July 07, 2008, 11:44:44 AM »
I used PICBASIC not C

It should be pretty simple code

The pseudo code is available on the Parallax site
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,430
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
Re: 3 in 1 Robot Avoiding an Obstacle
« Reply #3 on: July 07, 2008, 12:55:28 PM »
yeah its looks pretty simple, maybe I just need more time to think about it, but from first glance, I can't seem to wrap my mind around what the code should be.


I guess it would be bring the pin high, wait, bring the pin low, record number and convert to distance?

Offline Scheda

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Re: 3 in 1 Robot Avoiding an Obstacle
« Reply #4 on: July 07, 2008, 01:19:20 PM »
Fritsl ad www.LetsMakeRobots.com is an avid user of sonar. You should check out some of his bots, they do a great job using the sonar.

Here is a short tutorial on using the SRF05 with a PICAXE board.
http://letsmakerobots.com/node/66

Offline Commanderbob

  • Robot Overlord
  • ****
  • Posts: 146
  • Helpful? 2
  • Embeddedmicro.com
Re: 3 in 1 Robot Avoiding an Obstacle
« Reply #5 on: July 13, 2008, 09:20:48 AM »
I use the Ping sensor with AVR controllers all the time. You can do it two ways.

1)Send a pulse to start the sonar. Then wait for the line to go high, at that time sample a timer (or set it to 0). Then wait again for it to drop back down then sample the timer. Find how much time elapsed/2  and convert to distance.

2)Send a pulse to start the sonar. Set up an interrupt to capture the timer when the pin state changes. Capture and save the value when it goes high. The next interrupt is when it drops back down. Find how much time elapsed/2 (sound has to go there and back)  and convert to distance.

Justin

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,430
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
Re: 3 in 1 Robot Avoiding an Obstacle
« Reply #6 on: July 13, 2008, 11:43:19 AM »
Can you maybe take a look at my other post about this where I'm trying to come up with the code?

I haven't used timers or interrupts before.


http://www.societyofrobots.com/robotforum/index.php?topic=4656.0

 


Get Your Ad Here