Need some help with the parralax ping sensor(delay)

 

I have my code ready to go for my robot iam using the arduino uno the problem iam having is the delay when i loop everything togther the delay time from the ping and the delay time for my panning servo conflict I know ther is a way around this I just dont know what the best way is if anyone knows how to fix this problem please let me know Thanks Jason

Take a look into using some

Take a look into using some timers instead of just using a delay - this will allow your Arduino to keep processing away during those waiting periods.

What do you mean when you say timer?

I am new to this and not to sure what you mean when you say timers please explain Thanks Jason

http://arduino.cc/en/Tutorial

http://arduino.cc/en/Tutorial/BlinkWithoutDelay

Wow!

How in the world do you write code with a keyboard that has no periods or commas? Awesome!

Here’s some resources on

Here’s some resources on timers and interrupts:

Good article explaining what timers/interrupts are and some sample code:

http://www.uchobby.com/index.php/2007/11/24/arduino-interrupts/

Arduino libraries/samples:

http://arduino.cc/playground/Main/FlexiTimer2

http://arduino.cc/playground/Main/MsTimer2

I can’t wait to use them myself with my robot, so I found these useful to get a general idea on their use.

Maus