This question is an exact duplicate of:
We are building a large car that will drive at around 30mph and I am responsible for figuring out a way to detect if someone's in front of it. We just want it to beep if that's the case. We have been using the HC-SR04 ultrasonic sensor but it is very useless because it has poor range. The problem with the HC-SR04 is that it isn't long ranged and that if the car were driving at 30mph, it would be very hard to stop it by the time it detects something in front of it. What can I do about this? are there any alternative options?