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
Adafruit Motor/Stepper/Servo Shield for Arduino kit
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 13
- Joined: Sun Nov 04, 2012 11:48 am
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Adafruit Motor/Stepper/Servo Shield for Arduino kit
It could be a problem with your assembly of the shield. I cannot see from the photos you have posted.
-
- Posts: 13
- Joined: Sun Nov 04, 2012 11:48 am
Re: Adafruit Motor/Stepper/Servo Shield for Arduino kit
but i dont solder it the pin header at shield
- Attachments
-
- IMG01114-20121109-0357.jpg (191.37 KiB) Viewed 933 times
-
- IMG01113-20121109-0357.jpg (174.44 KiB) Viewed 933 times
-
- IMG01113-20121109-0344.jpg (289.17 KiB) Viewed 933 times
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Adafruit Motor/Stepper/Servo Shield for Arduino kit
That is not an Adafruit Motor Shield. You should contact the seller for technical support.
- shorn
- Posts: 3
- Joined: Thu Nov 08, 2012 6:08 pm
Re: Adafruit Motor/Stepper/Servo Shield for Arduino kit
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.
Sorry for the long winded description.
Steve
Edit: reposted as a new thread.
Last edited by shorn on Thu Nov 08, 2012 7:19 pm, edited 1 time in total.
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Adafruit Motor/Stepper/Servo Shield for Arduino kit
@Shorn - Best to start a separate thread for this question. This is unrelated to the topic of this thread.
-
- Posts: 13
- Joined: Sun Nov 04, 2012 11:48 am
Re: Adafruit Motor/Stepper/Servo Shield for Arduino kit
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?
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Adafruit Motor/Stepper/Servo Shield for Arduino kit
@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.
Please be positive and constructive with your questions and comments.