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.
Honestly the robot didn't perform well in the competition because it was too lightweight, but the electronics and programming were good.