(Read 685 times)
Aug 29, 2013, 11:07 am
I am new in this arduino forum.. I want to make my new robot with arduino uno r3 board. I connect the arduino motor shield, connect 4 dc bo motors, Also connect 2 servos, via arduino software. But only motor 2 can runing and one servos moving , I want to run 4 dc motor at a time with servos. The following function i want to works the robot
How it works:
I wanted a simple robot to drive around avoiding obstacles using the ping sensor.
Ping to see if there is any obstacles in front.
If not, drive forward, while pinging.
If there is an obstacle, stop, and take a distance reading to the left and right of the robot.
Turn for a fixed period of time in the further direction.
Ping again: If still blocked, keep turning that direction. If not blocked, go back to drive mode.
There are basically three modes the robot can live in: Drive forward (mode 1), stop and scan (mode 2), and turn (mode 3). When driving, it can do three things: Drive straight, turn left, turn right.
I already have the hardware is configured like so:
The Adafruit Motorshield from bhashatech.com
The Arduino is powered off of 9 volt batteries .
The Motorshiled is powered off a separate 4xC battery pack (6v) on top of the robot.
The 4 DC Bo motors & servo are powered off the Motorshield.
The Ping))) sensor draws power form the Arduino.
so any body know this code then pm me or mail me email@example.com
downloaded 21 times
downloaded 65 times
downloaded 59 times
Seattle, WA USA
Aug 29, 2013, 11:11 am
so any body know this code then pm me
That isn't how this forum works.
The art of getting good answers lies in asking good questions.
Aug 29, 2013, 01:36 pm
Note that when you use the servo library it disables analog output on some pins. If those pins are needed to control a motor shield then the servo would stop that working. I suggest you look at the servo library documentation to understand which pins are affected, and compare that against the pins you're using for your motor control.
AKA: Ray Burne
Aug 29, 2013, 02:31 pm
Congrats on getting your Arduino with so many accessories... sounds great.
Ping (ultrasonic) sensors are explained here:
My suggestion would be to google "Arduino" plus whatever term you want explained... for example, the above link came from "Arduino Ultrasonic Robot" ... lots of info out there.
For code, you may find bits and pieces that you can stitch together in Frankenstein fashion to develop what you want. However, many large cities have Arduino robot clubs. You can always join a virtual club, forum, and will probably have access to lots of software.
However you proceed, be patient and explore ONE sensor/device at a time until you fully understand that one... then expand your knowledge by adding the second, third, etc. You will likely encounter 'conflicts' with some devices and it will take time to research and fix issues.