Adafruit Motor Controller V1

This is a special forum devoted to educators using Adafruit and Arduino products for teaching.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
cyclechas
 
Posts: 4
Joined: Mon Jan 13, 2014 9:34 pm

Adafruit Motor Controller V1

Post by cyclechas »

I am using the Adafruit motor controller v1 with a Sainmart Uno board. I am also using Robot C to program. I have two dc motors plugged into M1 & M2 respectively, but cannot get the motors to run correctly. Do I need to use a breadboard to create a motor controller?

Thanks

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Motor Controller V1

Post by adafruit_support_bill »

You should be able to connect the motors directly to the shield. If you post photos of the front and back of the shield we can check for any assembly issues.

cyclechas
 
Posts: 4
Joined: Mon Jan 13, 2014 9:34 pm

Re: Adafruit Motor Controller V1

Post by cyclechas »

Robot C Screen Shot.jpg
Robot C Screen Shot.jpg (252.38 KiB) Viewed 963 times
Uno Motor Setup.jpg
Uno Motor Setup.jpg (11.85 KiB) Viewed 963 times
Thanks for the quick response. Here are some screenshots that might be helpful. I am using Robot C as the programmer but don't how to identify the motors to be read by Robot C.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Motor Controller V1

Post by adafruit_support_bill »

I need clear photos of the front and back of the shield to check the assembly.
The library is written for the Arduino IDE. I don't know that it has been ported to RobotC.

cyclechas
 
Posts: 4
Joined: Mon Jan 13, 2014 9:34 pm

Re: Adafruit Motor Controller V1

Post by cyclechas »

Thanks for the quick response. I re-installed the Arduino IDE and am able to get one motor to run using the AF_Motor library. What is the declaration to label both motors M1 & M2 in the sketch to run both motors? Also, what pins are running the motors if they are plugged in M1 & M2?

Thanks

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Motor Controller V1

Post by adafruit_support_bill »

What is the declaration to label both motors M1 & M2 in the sketch to run both motors?

Code: Select all

AF_DCMotor motor1(1);
AF_DCMotor motor4(4);
The library reference is here: https://learn.adafruit.com/afmotor-library-reference
Also, what pins are running the motors if they are plugged in M1 & M2?
Pin utilization by motor type is detailed here (about 1/3 down the page)
https://learn.adafruit.com/adafruit-motor-shield/faq

Locked
Please be positive and constructive with your questions and comments.

Return to “For Educators”