This project uses an HC-SR04 ultrasonic sensor and Arduino UNO to measure the distance of objects in both centimeters and inches. The measured data is displayed on an I2C LCD. The project was ...
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.
// C++ code // include the library code: #include // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); int ultrasonic = 0; long ...