I new to this and bought one of the obsticle viod robot hobby car to experiment with before building my lawnmover robot.
I a bit stuck on getting it to move like u cut grass. Say l would like it to go forward until ultrasensor pick up signal then make 180 degrees turns forward and next turn 180 in other direction.
Would appreciate if anyone could guide me on how to code this as there not a lot on this instance.
You want your vehicle to do a skid-turn (like a skid-steer tractor)... that is to say, hole one side still while the other side pushes forward. Imagine the left wheel with the brake on... and the right wheel driving forward... the left wheel will be the pivot, and the right wheel will turn your vehicle around 180 degree, AND in line to mow parallel to the current path.
This simulation shows the six turning methods (and stop, forward, backward).
I am just beginner and played around with origanal code that came with kit . If u could give me an idea of how to go about it or examples of how to go about it that would be great.
Your project should be something that you can mostly do yourself, but needs a little help to complete. Top three things to do to get help here:
In words, describe your project. Nothing long, just one or two sentences.
Show a drawing of the devices you are using or intend to use... these devices use pins for input/output, so connect the devices showing which pins you will be using. The drawings you have in post #4 are missing some pin numbers... so you need to fill those in. You do not need special drawings - a pencil and paper with boxes and lines is good enough.
Show the sketch (program) you have written.
For example: #1. I want to print "Hello, Chris!" to the Serial Monitor. #2. Drawing...
void setup() {
Serial.begin(9600); // start the Serial Monitor
Serial.println("Hello, Chris!");
}
void loop() { }
If (when) I make mistakes, other people will be able to see where I made a mistake and advise me what to change, or show me how to make the little change I need.
The modern bicycle that we know was invented only 200 years ago... but before that, small things needed to be invented like quality metal, metal working, metal fitting, the wheel, chains and sprockets... all of them little steps to make the "simple" bicycle.
I advise you make projects just out of reach so you can do most of it, with only a little bit of instruction, so you can learn a little from each project. Soon, you will be cutting patterns in your lawn.
Your kit contains everything you need... but sometimes the instructions or the pictures do not give a clear story. (I have built some).
The way you should build your kit is in sections. Your instructions probably started with just the Arduino, and had you write a sketch (program) to verify the Arduino was working. Again, I have built some kits, and again, sometimes they are not completely clear, but all you need is in the box... and if you have questions... ask.
Your pictures are from page 14 and the sketch was the final project. When you are in school, you do not take the final examination before the school year starts. Do the same with this project.
You'll probably find better guidance if you ask some more specific questions. If you came here and all you can say is "I'm lost" then there's not much hope. If you can ask specific questions about this piece of code or that piece of code then we can help. If you can't even understand enough to know what to ask then you need to go back a few steps and learn some basics first. Start at the Hello World example for Arduino, understand it, and move forward.
It's really really really hard to try to help someone with one of these projects when they are so over their head that they become just clueless to what you are trying to tell them. It's not a good time for the helper or the person being helped.