Go Down

Topic: New to world of Robotics need help with motor sheild and HC-SR04 sensor (Read 1 time) previous topic - next topic

infoseeker

Hi Guys

I am really stuck with my very first robotic project , I brought a Motor shield from ebay  got it to work with arduino UNO and really enjoy the basic stuff,  decided to expand my skills and I brought HC-SR04 module from ebay  got this too to work with arduino  no problems there.

My only problem is how do I link my sensor to the motor shield as all the pins are fitted onto the arduino board  can someone help me please

I want to make a robot that when it detect object it avoid it.

codlink

You are going to have to do some hacking.  You need to find the pins that the motor shield  are not using and hook up the sensor to those pins and program accordingly.
//LiNK

PaulS

Quote
My only problem is how do I link my sensor to the motor shield as all the pins are fitted onto the arduino board  can someone help me please

The motor shield does not USE all the pins, though. As codlink ways, you need to determine which ones it does use, or post a link to it, and we'll help.

Sarconastic

I have the same motorshield and the same dilemma. my plan is I ordered the stacking pin kit from Adafruit and am going to change out the pins on the motor board to hookup other pins/sensors to.. The board is basically the same as the Adafruit version 1 motorshield, just a Sainsmart clone.  i f you look really close on the shield you will find that their is a small breakout board area on the board you can hook up to for pins A0-A5. but they are really small.

Go here for some pretty good info.  http://learn.adafruit.com/adafruit-motor-shield
Here is a really good pdf for the shield too. http://learn.adafruit.com/downloads/pdf/adafruit-motor-shield.pdf

Also make sure you use the AdAFRUIT motor libraries they are the best ones for that shield.

Woody
http://blog.str8shotphoto.com

Sarconastic

Just for your info, I just used the pin A0 on the little breakout board on the Motorshield using code I got in another post here to use a manual start button and it works flawlessly. I just soldered a couple of female jumper wires in the hole and connected to my switch. I confirmed with the docs that A0-A5 are NOT used by the Shield

So they should be able to be used for your sensor as well
Woody
http://blog.str8shotphoto.com

albaflo

il n'y a pas d'âge pour apprendre

terryking228

Not exactly, but here's a working example of a separately-wired motor driver and the SR04 ultrasonic sensor (and a servo) to do collision avoidance.  Page HERE:

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

joe mcd

Why not be adventurous and use breakout boards rather than shields.  You will do a bit more soldering but gain much more flexibility.  For example I've recently been using the Pololu DRV8833- tiny, inexpensive and better than many shields.

Go Up