Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

Motor Shield
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Motor Shield

by jimcook on Mon Sep 01, 2008 4:34 pm

Everything worked well with the program in the Shield manual that runs the stepper motor.

My problem has been trying to get the program for a DC motor. It mentions that AFMotor.h should be included. The program does have a line that says: #include <AFMotor.h>.
When I try to compile I get an error message that includes:" :21: error: AFMotor.h: No such file or directory in function 'void setup()': In function 'void loop()': "
Can someone please translate?

jimcook
 
Posts: 83
Joined: Fri Dec 07, 2007 6:51 pm
Location: Agawam, MA

by adafruit on Mon Sep 01, 2008 5:31 pm

sounds like you didnt install the library

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by jimcook on Mon Sep 01, 2008 5:40 pm

Where is the best place to look for how to "install the library" and where is the "library" I should install?

I do see "AFMotorlibv2" folder that has a folder called "AFmotor" that holds "AFLotor.cpp" and "AFMotor.h". So I think I down loaded the proper files. My original question still stands. How do I "install" them?

ladyada wrote:sounds like you didnt install the library

jimcook
 
Posts: 83
Joined: Fri Dec 07, 2007 6:51 pm
Location: Agawam, MA

by adafruit on Mon Sep 01, 2008 7:36 pm

http://www.ladyada.net/make/mshield/download.html

"Arduino Stepper/Servo software library v2. Uncompress and stick the AFMotor directory into the Arduino/hardware/library folder."

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by jimcook on Mon Sep 01, 2008 8:13 pm

GREAT! So simple I was overlooking it. It works. Thankyou very much.

ladyada wrote:http://www.ladyada.net/make/mshield/download.html

"Arduino Stepper/Servo software library v2. Uncompress and stick the AFMotor directory into the Arduino/hardware/library folder."

jimcook
 
Posts: 83
Joined: Fri Dec 07, 2007 6:51 pm
Location: Agawam, MA

Intel Mac : 21: error: AFMotor.h: No such file or directory.

by buildingscience on Tue Sep 01, 2009 7:23 pm

I installed the latest arduino software and when i downloaded it, there was no "hardware" folder created when the disc image was mounted on my desktop. I am using an Intel mac.

So i created a folder "Arduino" and put the arduino application in it. Inside "Arduino" i also created a "hardware" folder and a "library" folder within "hardware". Then i placed the "AFMotor" directory inside of "library"

I opened the motorTest.pde and got the following error when i verified the code

21: error: AFMotor.h: No such file or directory In function 'void setup()':
In function 'void loop()':

Can someone explain why the arduino software can not locate AFMotor.h?

What seems strange is that i had to create the hardware folder, which is not mentioned as necessary in any of the earlier posts.

-thanks

buildingscience
 
Posts: 12
Joined: Tue Sep 01, 2009 7:15 pm

Re: Motor Shield

by buildingscience on Tue Sep 01, 2009 7:58 pm

ok, i saw this note and now i have the test running....

http://arduino.cc/blog/?p=313

no need to respond to this

buildingscience
 
Posts: 12
Joined: Tue Sep 01, 2009 7:15 pm

Please be positive and constructive with your questions and comments.