0
$\begingroup$

Dear Robotics Community,

I am participating in a Robotics tourney that will start in a few weeks. The challenge I signed up for is to deliver and dump ping pong balls to a box. I already have my robot and the ball container built, but I need some help with coding it.

I just need help coding an SR04 ultrasonic sensor for my Arduino robot. I want it so that when it senses the box in front of it, the robot turns on a motor and stops when the box is a certain distance away from the robot. I also want it to back up and go back to its starting position when it is done delivering the payload. I was told by my coach that a "boolean variable" would do the job, but I also do not know how to program this.

Thank you!

(Here is the robot platform I am using: https://www.elegoo.com/product/elegoo-uno-project-smart-robot-car-kit-v1-0/)

$\endgroup$
1
$\begingroup$

Did you try the newPing library ?

$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.