The code of my 2017 sumo robot, using an arduino nano, two HC-SR04 ultrasonic sensors, two TCS3200 color sensors and a L298N motor controller.
This library is to use the DFRobotics A02YYU and A02YYUW Serial distance sensor. The A02YYU(W) has a range of max 3.0 to 4.5 meter (10 to 15 feet). The UW version has an IP67 coating so it can be used ...