Arduino Forum

Using Arduino => Motors, Mechanics, and Power => Topic started by: technobot9482 on Mar 21, 2013, 07:05 pm

Title: how use motor shield ?
Post by: technobot9482 on Mar 21, 2013, 07:05 pm
Hello,

I want to use motor shield, but it don't run...

I use this code :
=============================
int motorM1 = 11;      // LED connectée sur la broche 9

void setup()
{
  pinMode(motorM1, OUTPUT);   // configure la broche en sortie
}

void loop()
{
  analogWrite(motorM1, 512);  // Résultat d'analogRead entre 0 to 1023
}
==========================

Thank you for help !
Title: Re: how use motor shield ?
Post by: THX_RoG on Mar 21, 2013, 07:10 pm
in this
void loop()
{
  analogWrite(motorM1, 512);  // Résultat d'analogRead entre 0 to 1023
}
try a val from 0 to 255

and what for motor controller your using
Title: Re: how use motor shield ?
Post by: technobot9482 on Mar 21, 2013, 07:21 pm
Sorry, I use DC motor. It is on M1.
Title: Re: how use motor shield ?
Post by: technobot9482 on Mar 21, 2013, 07:32 pm
It don't run...
Title: Re: how use motor shield ?
Post by: AlxDroidDev on Mar 21, 2013, 08:22 pm
Can you provide more info on the shield you are using? What model/make is it? What is the main driver in the shield (L293D, perhaps) ?

Is there a library provided by it? If so, there must be an "ENABLE" pin or signal you must send to make the motors turn on.
Title: Re: how use motor shield ?
Post by: technobot9482 on Mar 21, 2013, 09:58 pm
Oh, I find this :
http://ladyada.net/make/mshield/index.html
Super !