Re: Adafruit Motor/Stepper/Servo Shield for Arduino kit

by zero25 on Thu Nov 08, 2012 1:49 pm

the code i uploaded to mys arduino just:
#include <AFMotor.h>
AF_DCMotor motor(2, MOTOR12_64KHZ); // create motor #2, 64KHz pwm
void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println("Motor test!");
motor.setSpeed(200); // set the speed to 200/255
}
void loop() {
Serial.print("tick");
motor.run(FORWARD); // turn it on going forward
delay(1000);
Serial.print("tock");
motor.run(BACKWARD); // the other way
delay(1000);
Serial.print("tack");
motor.run(RELEASE); // stopped
delay(1000);
}


after my uploaded code success i tyr to connect motorDC to M2 but it is not work
and if i try to connect motor dc to M4 and gnd this motor is works but that motor works like nothing have command from this code
zero25
 
Posts: 13
Joined: Sun Nov 04, 2012 10:48 am

Re: Adafruit Motor/Stepper/Servo Shield for Arduino kit

by adafruit_support_bill on Thu Nov 08, 2012 2:17 pm

It could be a problem with your assembly of the shield. I cannot see from the photos you have posted.
User avatar
adafruit_support_bill
 
Posts: 25601
Joined: Sat Feb 07, 2009 9:11 am

Re: Adafruit Motor/Stepper/Servo Shield for Arduino kit

by zero25 on Thu Nov 08, 2012 2:46 pm

but i dont solder it the pin header at shield
Attachments
IMG01114-20121109-0357.jpg
IMG01114-20121109-0357.jpg (191.37 KiB) Viewed 567 times
IMG01113-20121109-0357.jpg
IMG01113-20121109-0357.jpg (174.44 KiB) Viewed 567 times
IMG01113-20121109-0344.jpg
IMG01113-20121109-0344.jpg (289.17 KiB) Viewed 567 times
zero25
 
Posts: 13
Joined: Sun Nov 04, 2012 10:48 am

Re: Adafruit Motor/Stepper/Servo Shield for Arduino kit

by adafruit_support_bill on Thu Nov 08, 2012 4:03 pm

That is not an Adafruit Motor Shield. You should contact the seller for technical support.
User avatar
adafruit_support_bill
 
Posts: 25601
Joined: Sat Feb 07, 2009 9:11 am

Re: Adafruit Motor/Stepper/Servo Shield for Arduino kit

by Shorn on Thu Nov 08, 2012 5:31 pm

I have an AF MOTOR/stepper shield, mated with an UNO, being used to operate a stepper on ports 3 and 4. I want to add dc motor control to the same shield, on port 1. Both the stepper and motor are to be controlled via one sketch. The sketch currently uses AFMOTOR.h and calls AF_stepper to control the stepper. Modifying the sketch to add the DC motor logic, I added AF_DCMotor and its parameters to control the motor. Commands are received via serial comm. and specify which device and other necessary info (forward, stop, etc., base on which device is being controlled. (The two devices would not be controlled at the same time.) However, when I verify/compile the sketch I get "conflicting declaration 'AF_DCMotor motor'" and points to that line in the sketch. So the obvious question is, can the shield, via AFMotot.h, control more than one, DIFFERENT, device, ie. motor+stepper, stepper+servo, etc.? And if it cannot, can I directly address the shield via the pins used and send the necessary commands to the shield, bypassing the AFMotor.h library?
Sorry for the long winded description.
Steve
Edit: reposted as a new thread.
Last edited by Shorn on Thu Nov 08, 2012 6:19 pm, edited 1 time in total.
Shorn
 
Posts: 3
Joined: Thu Nov 08, 2012 5:08 pm

Re: Adafruit Motor/Stepper/Servo Shield for Arduino kit

by adafruit_support_bill on Thu Nov 08, 2012 6:07 pm

@Shorn - Best to start a separate thread for this question. This is unrelated to the topic of this thread.
User avatar
adafruit_support_bill
 
Posts: 25601
Joined: Sat Feb 07, 2009 9:11 am

Re: Adafruit Motor/Stepper/Servo Shield for Arduino kit

by zero25 on Fri Nov 09, 2012 8:47 am

how to control motor DC at M1 and M2 with difrent rotation at the same time and how to control 2 motor DC at M1 and M2 with same rotation at the same time?
zero25
 
Posts: 13
Joined: Sun Nov 04, 2012 10:48 am

Re: Adafruit Motor/Stepper/Servo Shield for Arduino kit

by adafruit_support_bill on Fri Nov 09, 2012 8:50 am

@zero25 - that is not an Adafruit Motorshield. It appears to be a copy of some kind. We cannot provide support for products we do not manufacture or sell. Please contact the seller for technical support.
User avatar
adafruit_support_bill
 
Posts: 25601
Joined: Sat Feb 07, 2009 9:11 am