0

How to control motors with Motor shield using PING sensor
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: How to control motors with Motor shield using PING sensor

by GGipson on Tue Feb 01, 2011 6:52 pm

Now if I'm using just a dc motor and not a stepper would I still include this library?
GGipson
 
Posts: 11
Joined: Sun Oct 10, 2010 2:59 am
Location: San Marcos, CA

Re: How to control motors with Motor shield using PING sensor

by adafruit_support_bill on Tue Feb 01, 2011 6:55 pm

Yes. Look at the MotorTest example in the IDE (under File->Examples->AFMotor).

adafruit_support_bill
 
Posts: 76185
Joined: Sat Feb 07, 2009 10:11 am

Re: How to control motors with Motor shield using PING sensor

by GGipson on Tue Feb 01, 2011 7:09 pm

I've ran both the motor test and the PING test and individually they work great! Its when I try to control the motors using the PING is where I'm having problems! I was successful using a PING to turn on an LED when I put my hand in front of it so I thought I could use that HIGH and low or 1 and 0 to turn a motor on and off.
GGipson
 
Posts: 11
Joined: Sun Oct 10, 2010 2:59 am
Location: San Marcos, CA

Re: How to control motors with Motor shield using PING sensor

by GGipson on Tue Feb 01, 2011 7:26 pm

ok thanks again! You always help me and I really appreciate it! :D
GGipson
 
Posts: 11
Joined: Sun Oct 10, 2010 2:59 am
Location: San Marcos, CA

Re: How to control motors with Motor shield using PING sensor

by adafruit_support_bill on Tue Feb 01, 2011 8:13 pm

OK. Why don't you post your working PING code and we can add motors to that.

adafruit_support_bill
 
Posts: 76185
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.