Im extremely new to coding and i have built a robot to use skid steer. Im trying to figure out how to write the correct code to tell the arduino where to go.
Have you figured out how to tell the Arduino where it is before it goes? If you don't know where you are starting from, how can you tell something which direction to go?
Thats a good point, i didnt know that i needed to. Im assuming i need to define starting point as [0,0] but again im lost as to how i would do something like that
But you need to know which direction the car must go in to get to the second point. You have not explored that problem. If I told you that you are at a home point, but now go to point "B", which direction would you go in?
Search for the phrases like "differential drive robot steering", "navigation", etc. for lots of explanation and tutorials.
You will need wheel encoders for the robot, and must take into account that the wheels slip during turns.
Will this help me with the coding as well? Because i dont have any experience with coding so im clueless with how to do it
The tutorials very often come with code. But you won't know until you sit down and do your research.
In the meantime you can start working through the examples that come with Arduino, to learn the programming language, about special features of Arduino, etc.
This is a challenging project! There is lots to learn, and plenty of fun to be had. Perhaps you can find a robotics or Maker club in your area, to help you get started.
If the two sides go the same speed the robot will go straight forward or back. If they travel at different speeds the robot will turn.
To get to a particular place, you at least have to know how far away it is and what direction you are facing relative to the destination. If you are facing the destination, just go straight the known distance. If you are not facing the destination, turn the robot until it faces the direction.
For turning in place, take the distance between the 'tracks', multiply by PI to get the circumference, divide by 360 to get motion per degree, and multiply by the number of degrees you want to turn. That will give you a rough idea of how far the 'tracks' move, one forward and one backward.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.