Obstacle Avioding Car

Hi guys

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.

If you turn 180 and then turn 180 in another direction, you return to the starting point.

Code is directed towards interfaces, hardware. What's Your hardware?
Links to datasheets, schematics, please.

Hi

Here is what i have so far. Thanks for quick response. I been steuggleing for while with this .

sketch_nov23a.ino (3.13 KB)

I a want it to turn in opposite direction . First turn left and senond turn right , so it can move from one side to another.

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).

Yeah . Thats the idea.

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:

  1. In words, describe your project. Nothing long, just one or two sentences.
  2. 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.
  3. Show the sketch (program) you have written.

For example:
#1. I want to print "Hello, Chris!" to the Serial Monitor.
#2. Drawing...

         +----------| USB |--------+
         | D13/SCK        MISO/D12 |
         | 3.3V           MOSI/D11~|
         | Vref             SS/D10~|
         | A0                   D9~|
         | A1       NANO        D8 |
         | A2                   D7 |
         | A3                   D6~|
         | A4/SDA               D5~|
         | A5/SCL               D4 |
         | A6              INT1/D3~|
         | A7              INT0/D2 |
         | 5V                  GND |
         | RST                 RST |   +---------+
         | GND    5V DO  GND   TX1 |---| Serial  |
         | Vin    DI SCK RST   RX1 |---| Monitor |
         +-------------------------+   +---------+

#3. Sketch

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.

I did put up schematic and a sketch of what i have done so far . All i want some guidance.

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.

Start at page 1.

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.

I also fixed the typos in your title for you. People are a lot more apt to help when it looks like you can pay attention to detail.

I wil remove my self from here came for help all i am getting is criticism.

Ok. I was trying to help you get some better help. If you want to leave then bye.

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