Help building first robot.

I want to build a robot which moves forward and upon nearing an obstacle scans the area with an ultrasonic distance sensor and moves in the direction in which there is no obstacle. I wish to use one servo for sweeping. Two geared motors for wheels and an ultrasonic distance sensor for obstacle detection.

The problem is I'm not good at coding (at least for now).

Can some one point me to an instructable or some other place where someone has already done this so I can copy and paste the code.

Also can some one paste the psuodo code for scanning with ultrasonic ping sensor.

Are you honestly saying that google, or bing etc, couldn’t find this information?

I tried searching google, but many of the results did not include a robot that does a scan or sweep with servo.

But many do. I googled 'arduino robot sweep scanner'

The first hit was which contains a working sketch using a sharp IR sensor. Second hit also contains a working sketch using an ultrasonic sensor.

Both of them use servos for wheels. Servos cost a lot and I can't afford them. Is there an example which uses gear motors?

What does it matter what drives the wheels? You could have the wheels driven by hydraulic motors, and the basic structure of the code would be the same. (slightly oilier, but the same)

Thanks AWOL. I didn't think it was so. I thought servos are more complex. I'll try understanding the servo code so that I can change it. Programming servos is a bit complex compared to ordinary motors. Any help on how to change the code would be appreciated.

Any help on how to change the code would be appreciated.

I can’t see any code.