Hi all! I recently purchased an Elegoo Smart Car v1.0. After building it, I uploaded the obstacle avoidance code. Somehow, the car only moves backwards. I did what I could to troubleshoot. What am I doing wrong? Has anyone else had this experience?
Like writing a test sketch that simple sets up the ultrasonic sensor, and then in the loop, read the sensor value and print it to the serial monitor.
If that is giving you reasonable values (as you move your hand in front of the sensor) then you will know that it is hooked up properly and behaving as expected.
Then I would do something similar for the motor drivers. Write a test sketch that makes the motors turn forward for 1 second. Backwards for 1 second. Turn left (one forward, one back) for one second then right for on second, then stop.
Confirm that you have everything hooked up to make the motors go forward and backward on command.
It probably does some setup, then in the loop, it reads the ultrasonic sensor and then moves the motors.
You could use copy out the pieces that deal with the sensor for one sketch and the parts that deal with the motor for the second.
Post the original code here and we can help you with which is which.
Use code tags with posting code. If you do not know how, it means you need to read the sticky post How to use this forum - please read
hello, i have some problem with my project. I have to make an autonomous car with nvidia Tk1 and arduino uno, i must to set PID controller. Can you have me? confirm if you can. My email is: Hieunmhe130143@fpt.edu.vn. Thank you so much!
Which issue do you have, what components do you use? There are different issues described in this thread .
If your issue is, that your car is going backwards, try switching the motor connections in your motor driver (or adjust the code accordingly).
Hi , I ran into the same issue. Then I loaded the simple program that makes car go forward and backward and voila the car did exactly opposite of what was expected. I dutifully crossed the connections from wheels ie. left front wheel would be connected where right front wheel was connected. Now my car moves as expected.