Let's Make Robots!

Multi sensor robot

Hi Guys,

ive finally got my robot platform working with simple object avoidance on a arduino, using a single ping sensor. the way i got it working was a simple if (sensor > 5cm ) drive forward; else (avoid obsticle). i now want to add some bumpers and other sensors but i cant figure out how to get it to work, and the time i felt like i was making progress i couldnt get the sketch to compile.

Is there a obvious way to set out the code so i can use multiple sensors to initiate the (avoid obsticle) loop.