Make a self-blancing robot with IR Range Sensors

I wonder if it would be possible to make a self-balancing robot with two IR range sensors.

The idea is, the robot is basically a stand-up board with two wheels, and on each side of the board, install an IR range sensor facing the ground. Then, adjust the wheels according to the readings of the two sensors.

I am worried because I am not sure how accurate the IR sensors are. Would this be possible?

Google is your friend. A search with "self balancing robot ir sensor" returns many links to similar projects.
good luck

it is actually pretty easy to do just using one ir sensor.

for the program when it starts take a reading while the robot is upright. then if the reading gets further away you know you are falling away from the sensor so you turn on the motor. the amount of input is based on the change in distance between each reading multiplied by a constant. this is just proportional control though so it will oscillate a lot and not just sit there. you can also keep track of the changes in distance to see if you are falling faster are slower. falling faster means the motors have to move more and falling slower means they have to move less. This can be a problem though with some ir sensors like the sharp detectors because they have a 36 mS delay between readings so the robot could take to long to recover.

sidenote: This won't work on inclines because the robot will want to always stay perpindicular to the ground.

Would it not be easier to use an accelerometer?