KayTwenty / SumoCode

The SumoCode repository contains the source code for our sumo bot, which is designed for the upcoming sumo robot competition.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement Ultrasonic Sensor Support for Sumo Bot

KayTwenty opened this issue · comments

commented

Summary:
The current code for the sumo bot lacks support for an ultrasonic sensor, which limits its ability to detect and track obstacles. This issue aims to add ultrasonic sensor support to the existing codebase.

Proposed Changes:

  1. Connect the ultrasonic sensor to appropriate pins on the Arduino board.
  2. Implement functions to trigger the sensor, measure the echo response, and calculate the distance.
  3. Modify the code to detect obstacles based on the measured distance.
  4. Implement obstacle tracking functionality to follow the target using the sensor data.
  5. Add debugging functionality to print the distance measured by the sensor.

Additional Considerations:

  • The code should account for the specific pins used for the ultrasonic sensor and adjust accordingly.
  • The desired distance from the obstacle should be configurable.