2.5 Ultrasonic
If you use the ultrasonic sensor you may use a library downloaded from the Net.
But I haven´t found anyone that was supported by an interrupt. So often you will have to wait a long time, until you will get a new value. Sometimes about 40ms. If your robot drive with a velocity of 30cm per second (our is able to do it) then it will last nearly 2cm before you get a new value.
Oh sh.. where is the line?