Ultrasonic sensor connected to a joystick controlled car that stops within a predefined distance. I am new to arduino and need help

I want to add an ultrasonic sensor to a joystick controlled car that stops within a predefined distance. I am new to arduino and need help

With what?

How do i integrate the ultrasonic sensor and the joystick conteolled car so that it stops when the distance is 100cm.

You haven't told us anything about the car or the sensor, so it's hard to say.

Hi, @5hsn5
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".

This will help with advice on how to present your code and problems.

Can you please post the codes you have now, so we can advise you?

Thanks... Tom... :smiley: :+1: :coffee: :australia:

1 Like

I'd learn how to use the ultrasonic sensor by using a ultrasonic library, like New Ping. Once I got a handle on how to do the u-sonic thing, I'd then integrate the u-sonic code into the project.

1 Like

Something like

if (usRangeCm () < 100) {
  stopCar ();
}
1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.