Pages: [1]   Go Down
Author Topic: how use motor shield ?  (Read 415 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 !
Logged

Germany
Offline Offline
Jr. Member
**
Karma: 1
Posts: 80
Arduino in VS MODE
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

UNO,MEGA2560,MEGA2560
Killed:UNO, MEGA2560, ... More to come

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It don't run...
Logged

BHZ, MG, Brazil
Offline Offline
Sr. Member
****
Karma: 10
Posts: 346
Android developer; Arduino enthusiast
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Learn to live: Live to learn.
Showing off my work: http://arduino.cc/forum/index.php/topic,126197.0.html

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: