Modifications

Sauter à la navigation Sauter à la recherche
Ligne 202 : Ligne 202 :     
void setup() {
 
void setup() {
   Serial.begin(9600);          // set up Serial library at 9600 bps
+
   Serial.begin(9600);          // configure la connexion série a 9600 bauds
   Serial.println("Stepper test!");
+
   Serial.println("Test pas-a-pas!");
   −
   motor.setSpeed(10);  // 10 rpm  
+
   motor.setSpeed(10);  // 10 rpm (rotation par minute) 
    
   motor.step(100, FORWARD, SINGLE);  
 
   motor.step(100, FORWARD, SINGLE);  
Ligne 226 : Ligne 226 :  
}</nowiki>
 
}</nowiki>
   −
If you want two stepper motors to step at once you'll need to write something like this:
+
Si vous voulez que les deux moteurs pas-à-pas fonctionnent en même pas, vous devez utiliser un comme comme ce qui suit:
    
  <nowiki>void doublestep (int steps, int direction, int style) {
 
  <nowiki>void doublestep (int steps, int direction, int style) {
29 917

modifications

Menu de navigation