Go Down

Topic: how use motor shield ? (Read 558 times) previous topic - next topic

technobot9482

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 !

THX_RoG

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
UNO,MEGA2560,MEGA2560
Killed:UNO, MEGA2560, ... More to come

technobot9482

Sorry, I use DC motor. It is on M1.


AlxDroidDev

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.
Learn to live: Live to learn.
Showing off my work: http://arduino.cc/forum/index.php/topic,126197.0.html

technobot9482

Oh, I find this :
http://ladyada.net/make/mshield/index.html
Super !

Go Up