Même problème, à savoir :
1er phase :---|----2 eme phase :-----|----3 eme phase :---|----4 eme phase :
M2 vert-------|-----M2 éteinte--------|-----M2 rouge--------|-----M2 éteinte
M1 rouge-----|-----M1 éteinte--------|-----M1 vert----------|-----M1 éteinte
M4 vert-------|-----M4 éteinte--------|-----M4 rouge--------|-----M4 éteinte
M3 rouge-----|-----M3 éteinte--------|-----M3 vert----------|-----M3 éteinte
Du coup j'ai cablé mon moteur sur M1 et M3...
Je ne sais pas si c'est le plus optimal (ou mal) mais pour le moment je vais faire avec et ca à l'air de fonctionner. Pour info, je suis sur MacOS X, arduino uno V2, soft arduino 1.0, et rotoshield 1.0.
Le code que j'utilise:
- Code: Tout sélectionner
// Snootlab Max 7313 Motor shield library
// Based on Adafruit Motor shield library
// https://github.com/adafruit/Adafruit-Motor-Shield-library
// copyleft Snootlab, 2011
// this code is public domain, enjoy!
#include <Wire.h>
#include <snootor.h>
SnootorStep M;
SnootorStep M1;
void setup(){
// Serial.begin(9600);
Wire.begin();
/*
* Stepper initialization :
*
* init(delay,stepcount,motornum, mode);
*
* where :
*
* * delay is the time between each basic step, in microseconds, which determines the motor speed
* * stepcount is the number of steps per turn
* * motornum is 1 or 2, depending wiring
* * mode is either MOTOR_MODE_HALFSTEP or MOTOR_MODE_FULLSTEP
*/
M.init(700,48,1,MOTOR_MODE_FULLSTEP);
M1.init(700,48,2,MOTOR_MODE_FULLSTEP);
}
void loop(){
M.setMode(MOTOR_MODE_FULLSTEP);
M1.setMode(MOTOR_MODE_FULLSTEP);
for (int loopIng=0;loopIng<10;loopIng++){
M.forward(48*2*loopIng);
SC.delay(2000);
delay(500*loopIng);
}
}
J'ai du déclarer M et M1, sinon ca ne fonctionne pas...
Autre point, je suis débutant dans le monde de l'électronique.

Merci par avance pour la suite...