Advice with Motor Shield

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Advice with Motor Shield

Postby JohnBaloo » Wed Apr 25, 2012 1:11 am

Hi ,
I have the Adafruit motor shield running a DC motor, I would like to add a temp sensor and an LDR.
How can I use the other pinouts with the motor shield on top of the arduino ??.
Thanks
John
JohnBaloo
 
Posts: 13
Joined: Mon Aug 23, 2010 4:21 pm

Re: Advice with Motor Shield

Postby adafruit_support_bill » Wed Apr 25, 2012 5:33 am

There are breakouts for all the pins adjacent to the headers. The analog pins also have a row of power and ground breakouts. You can either solder your sensors directly to those holes, or use headers.
User avatar
adafruit_support_bill
 
Posts: 16635
Joined: Sat Feb 07, 2009 9:11 am

Re: Advice with Motor Shield

Postby JohnBaloo » Fri Apr 27, 2012 4:08 pm

All I can see is the 6 analogue pins.
John
JohnBaloo
 
Posts: 13
Joined: Mon Aug 23, 2010 4:21 pm

Re: Advice with Motor Shield

Postby adafruit_support_bill » Sat Apr 28, 2012 4:51 am

Sounds like you have an earlier version of the board. There are a couple of other ways:
If it is not already built, you can build it up with stacking headers.
You could build up a protoshield with stacking headers and put that between the Arduino and the motor shield.
Or you can just tack-solder the leads to the top of the header pins.
User avatar
adafruit_support_bill
 
Posts: 16635
Joined: Sat Feb 07, 2009 9:11 am

Re: Advice with Motor Shield

Postby JohnBaloo » Sat Apr 28, 2012 11:54 am

Thanks for the reply, yes it is already soldered so I guess it will
have to be the protoshield way.
Thanks
John
JohnBaloo
 
Posts: 13
Joined: Mon Aug 23, 2010 4:21 pm

Re: Advice with Motor Shield

Postby adafruit_support_bill » Sat Apr 28, 2012 12:08 pm

Don't forget to order the stacking headers. The standard protoshield kit comes with regular headers.
User avatar
adafruit_support_bill
 
Posts: 16635
Joined: Sat Feb 07, 2009 9:11 am

Re: Advice with Motor Shield

Postby almightyink » Mon Apr 30, 2012 10:56 am

MY EYES ARE BLEEDING out of my head because ive been staring at this screen for HOURS trying to figure out how to get
a Small stepper motor - PF35T-48
ID: 168

to do anything on my UNO W motorshield....i keep getting ' AFMotor does not name a type'

!!!

do i need to identify it somewgere? ive searched forum after forum and the tutorials...i must have missed something


this is the current sketch that is being rejected


#include <AFMotor.h>
AF_Stepper motor(400, 2);
void setup() {
Serial.begin(9600);
motor.setSpeed(150);
motor.step(936, BACKWARD, DOUBLE);
}
void loop() {
}

what do the #'s (400, 2); represent?

i hooked the motor up exactly as specified on the arduino website...to M1 and M2

pleeeez help a newbie out
almightyink
 
Posts: 3
Joined: Mon Apr 30, 2012 10:33 am

Re: Advice with Motor Shield

Postby adafruit_support_bill » Mon Apr 30, 2012 11:10 am

.i keep getting ' AFMotor does not name a type'

That indicates that your library is not installed correctly. Follow the instructions here:
http://www.ladyada.net/library/arduino/libraries.html
User avatar
adafruit_support_bill
 
Posts: 16635
Joined: Sat Feb 07, 2009 9:11 am

Re: Advice with Motor Shield

Postby cwebs1 » Mon Apr 30, 2012 2:08 pm

The 400 is the number of steps it takes for one turn of the motor. Most steppers are 48 or 200 or more. Set this to the number of steps it takes for your motor to turn once around. Your stepper is 48. Change the 400 to 48. The 2 is the port to connect your stepper to. M3 and M4 are port 2. You have your motor connected to M1 and M2. That is port 1 so change the 2 to 1. Hope this helps. This and the other reply should get you going. Read the part on steppers very carefully. Carl
cwebs1
 
Posts: 6
Joined: Mon Apr 30, 2012 7:18 am

Re: Advice with Motor Shield

Postby almightyink » Fri May 04, 2012 10:38 pm

great....i am still getting "AFStepper does not name a type"

i followed the instryctions on how to download the library, and i think i did.... as per suggested

the instructions on the site seem somewhat vague to me...im not super savy w computers, could some one please clarify these instructions?

ie.. open new arduino sketch

go to sketch/examples....etc


open control panel or whatever..


sorry to b a pain
almightyink
 
Posts: 3
Joined: Mon Apr 30, 2012 10:33 am

Re: Advice with Motor Shield

Postby adafruit » Sat May 05, 2012 3:31 pm

did you create a 'libraries' folder in your ARDUINO SKETCH FOLDER?
User avatar
adafruit
 
Posts: 10548
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Advice with Motor Shield

Postby almightyink » Sun May 06, 2012 7:36 am

i imported a LIBRARIEs' file from the 'ARDUINO.1' file i downloaded into

C:\Documents and Settings\Delaney\My Documents\Arduino\libraries !\New Folder\libraries (on my computer)

should it be put somewhere else? i tried to put it in the same place as the tutorial...not working

When i click on..

Files> Example

there is a list of functions...i go down to "STEPPER" and choose 1 of the bottom 3

i add AFMotor, verify, and....

it says highlighted in yellow(same Stepper myStepper(stepsPerRevolution, 8,9,10,11);

no dice (i changed it to 48, 1,2) for 48 steps per revolution, port 1 and 2,,same thing

perhaps start from the beginning

like..

download file marked 'arduino.25 from such and such website

goto...

sorry im so lost ...i appreciate everyones help...thanks!
almightyink
 
Posts: 3
Joined: Mon Apr 30, 2012 10:33 am

Re: Advice with Motor Shield

Postby adafruit_support_bill » Sun May 06, 2012 10:03 am

Close all Arduino IDE windows.
Delete all copies of the AF_Motor library on your system now.
Download and unzip the AF_Motor library folder and move it to: "C:\Documents and Settings\Delaney\My Documents\Arduino\libraries"
Then open the IDE and load the example sketch.
User avatar
adafruit_support_bill
 
Posts: 16635
Joined: Sat Feb 07, 2009 9:11 am


Return to Arduino Shields from Adafruit

Who is online

Users browsing this forum: No registered users and 8 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [114]

Raspberry Pi[82]
 
FLORA[24]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[12]
Arduino[60]
 
NETduino[14]
 
BeagleBone[23]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[39]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[9]


 
Breakout Boards[35]
LCDs & Displays[49]
Components & Parts[70]
Batteries & Power[54]
EL Wire/Tape/Panel[52]
LEDs[112]
 
Wireless[16]
Cables[66]
 
Lasers[6]
Sensors/Parts[147]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[41]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[25]


 
Stickers[41]
 
Skill badges[55]
 
Books[26]
 
Circuit Playground[7]
 
Gift Certificates[4]