Modifications

Sauter à la navigation Sauter à la recherche
Ligne 67 : Ligne 67 :     
== Créer un objet moteur pas-à-pas ==
 
== Créer un objet moteur pas-à-pas ==
OK now that you have the motor HAT object, note that each HAT can control up to 2 steppers. And you can have multiple HATs!
+
Nous disposons maintenant d'un objet MotorHat OK now that you have the motor HAT object, note that each HAT can control up to 2 steppers. And you can have multiple HATs!
    
To create the actual Stepper motor object, you can request it from the MotorHAT object you created above with '''getStepper(steps, portnum)''' where steps is how many steps per rotation for the stepper motor (usually some number between 35 - 200) ith a value between 1 and 2. Port #1 is '''M1''' and '''M2''', port #2 is '''M3''' and '''M4'''
 
To create the actual Stepper motor object, you can request it from the MotorHAT object you created above with '''getStepper(steps, portnum)''' where steps is how many steps per rotation for the stepper motor (usually some number between 35 - 200) ith a value between 1 and 2. Port #1 is '''M1''' and '''M2''', port #2 is '''M3''' and '''M4'''
29 917

modifications

Menu de navigation