Servo steering on a 2WD

Hey, we are working on a project and we seem to have a problem, and I've searched for hours and found nothing, we are using a 2WD drive train with a servo for steering and trying to figure out how to make it work, the ultrasonic sensor is fixed to the front and we desperately need code for this project, any help would be wonderful.




Everyone is going to ask you this, so I will be the first. Have you written separate programs to test every component of your vehicle? And do you now understand how to operate each of those components? Without that knowledge, there is no next step.

2 Likes
1 Like

I have little to none in regards to experience with programming, the most I’ve done is blocks in GMS and EV3, so when it come into regard with written programming I am illiterate, so basically anything would be great help.

I have a feeling the prof wants you to learn some basic coding. There are many tutorials etc on line to help. you. Since you have no experience starting in C++ for the Arduino should go fairly smooth without many problems. Down some sketches that do part of what you want such as turn a LED on and off with a button. Play with the code until you understand it. The pins have names and for the most part can be inputs or outputs, you have to tell it how to behave in your code, the pinMode command.

But you wont even make the effort to click a link... I can predict your future.

1 Like

im not using the lafvin im using an arduino UNO, i apperciate the help tho

i have little to zero knowledge about programming, i can sort of manipulate the different variables but they for the most part have to be pre existing, and i knew how to write out the different things i would have

we have done basic things like that, but no to the extent of running a RWD with a servo steering and a fixed u-sensor, if i knew how to write them out even individually i would and then figure out how to put it together i would, but i don't that's why i'm reaching out for help

Then start with learning how to control your servo, all by itself, and then you can apply that knowledge to the 2WD device. When the steering of the device works properly, then pick the next part and do the same learning. We can't open your mind and insert knowledge and experience.

1 Like

Lafvin uses Uno. Everything you need is in that link. You are welcome.

2 Likes

That is easy to get, just a lot of practice and debugging your mistooks. In a few months maybe longer you will be experienced.

They are. See post #5. Copy what you want. Ask any question.

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