Obstacle Avoidance Robot Car - Arduino

The programming code is attached here as a .txt file. Download it and paste the text on the Arduino compiler.
Remember to add the IRremote library (also attached to this post) to your arduino software before trying to compile the code! 

Further information about motor controller and IR receiver here:
http://adhocnode.com/arduino-irrecv-module/
http://arduino-info.wikispaces.com/IR-RemoteControl
http://adhocnode.com/motor-control/

I bought the robot from:
http://dx.com/p/arduino-compatible-bluetooth-controlled-robot-car-kits-146418

The robot moves avoiding obstacles and choosing the best way to follow by ultrasound.

  • Control method: Autonomous navigation, Infra Red Control
  • CPU: arduino uno
  • Power source: 2x 3.7V Li-ion 4800mAh
  • Programming language: Arduino
  • Sensors / input devices: HC-SR04 ultrasonic sensor
  • Target environment: indoor

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/obstacle-avoidance-robot-car-arduino

Nice bot. Are you powering

Nice bot. Are you powering the motors with one 3.7v pack or do you have the two packs in series? 

Need help with the L298N

I got the same bot but from ebay this week. Could you please tell me where I should connect the wires of the motors for I don’t know which two I should put together in MOTOR A and MOTOR B.

Need help with the L298N

I got the same bot but from ebay this week. Could you please tell me where I should connect the wires of the motors for I don’t know which two I should put together in MOTOR A and MOTOR B.

Wiring the motors

You must connect left motors together in MOTOR A and right motors together in MOTOR B. Be careful with their polarity. I´m posting 2 pictures of my wiring. Hope you find them helpful!

DSC_1441.jpg


DSC_1442.jpg

Thank you.

dupe

Need help with the L298N

dupe

Need help with the L298N

dupe

Need help with the L298N

dupe

thANKS.

 Thanks for the bottom part. I got that right. But I have a problem with where to place the upper arduino related wires. Please if you’ve got a diagram for where to place each wire, post it. im so confused right now.

My Arduino wiring

DSC_1439.jpg

DSC_1443.jpg

thank you soooo much for the wiring.

Sorry if im asking too much, but if you’re an expert programmer, please help me with this:

i downloaded a script for arduino: (this is part of it)

#include “Ultrasonic.h”

#include <Servo.h>

#include <Motor.h>

Ultrasonic ultrasonic(12,13); // 12->trig, 13->echo

Servo myservo; // create servo object to control a servo

Motor motor;

 

it’s showing me this and not letting me compile:‘Ultrasonic’ does not name a type

What does this mean? And what should i do to fix it?

i put the wires just like

i put the wires just like you said, downloaded the IR library and installed it, and uploaded the script. Now all that happens when I press the ‘1’ button is the robot judt keeps moving forward. I tried to move the head thinking that the servo was stuck, but the head (the ultrasonic sensor) would just vibrate in its place. You got any idea about what’s happening?

 

Check the wiring of the

Check the wiring of the microservo and ensure that you are using the correct pin according to the programming code. 

Microservo must be connected

Microservo must be connected to pin number 5… just in case

Thanks! I´m using 2

Thanks! I´m using two 3.7 V batteries in series to power the Arduino board. Motors are powered by the Arduino 5V output

Help with wiring required with this code

I have bought kit, sensor shield is v4.0 , can you please help me in wiring this ? i am really confused and i am very new to this…

i have tried searching on google so far i am not able to figure it out completely. 

please i need help


You may check my wiring in

You may check my wiring in the pictures i posted earlier in this blog. Look for them. Good luck!

Wiring confusion

Can you please help me in the wiring? and where should i put the ENA & ENB pins? 

Please send me schematic capture or writing diagram of project

Thank you for sharing . I have got code . But i don’t have neither schematic capture nor writing diagram of project . please send it for me .

 My gmail is : [email protected]

Thank you so much !