Go Down

Topic: how use motor shield ? (Read 1 time) 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

technobot9482

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

technobot9482


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.
Some of my projects:
Shield for DS1337+, DS1624 and AT24C1024B (RTC, temp & mem): http://forum.arduino.cc/index.php/topic,126197.0.html
CHDK Camera remote shutter (BT, IR, USB): http://forum.arduino.cc/index.php?topic=295377.0

technobot9482

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

Go Up