nspython12:commentaires
Différences
Ci-dessous, les différences entre deux révisions de la page.
nspython12:commentaires [2017/07/05 15:27] – créée d52fr | nspython12:commentaires [2017/07/05 15:51] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 8: | Ligne 8: | ||
** Set 1A to HIGH and Enable to HIGH to start the motor and let it run for 5 seconds.** | ** Set 1A to HIGH and Enable to HIGH to start the motor and let it run for 5 seconds.** | ||
- | Mettre 1A à HIGH et Enable à HIGH pour démarrer le moteur et lelaisser | + | Mettre 1A à HIGH et Enable à HIGH pour démarrer le moteur et le laisser |
** Stop the motor by setting the Enable to LOW, sleep for 2 seconds, then run GPIO.cleanup().** | ** Stop the motor by setting the Enable to LOW, sleep for 2 seconds, then run GPIO.cleanup().** | ||
- | Arrêter le moteuren | + | Arrêter le moteur en mettant Enable à LOW, attendre 2 secondes, puis lancer GPIO.cleanup(). |
** The first part of the program will be used in the next one.** | ** The first part of the program will be used in the next one.** | ||
- | La première partie du programme sera utilisée | + | La première partie du programme sera utilisée |
_______________________________________________________________ | _______________________________________________________________ | ||
Ligne 28: | Ligne 28: | ||
** We are setting pin 23 to be a PWM Output line with 40% duty cycle (on 40% of the time and off 60% of the time.** | ** We are setting pin 23 to be a PWM Output line with 40% duty cycle (on 40% of the time and off 60% of the time.** | ||
- | Nous déclarons le picot 23 comme une ligne de sortie PWM avec un rapport cyclique de 40% (allumé pendant 40% du temps et éteint pendant 60%) | + | Nous déclarons le picot 23 comme une ligne de sortie PWM avec un rapport cyclique de 40 % (allumé pendant 40 % du temps et éteint pendant 60 %). |
** We start the motor by setting the enable to High and setting the Duty Cycle to 70. The motor will run for 5 seconds.** | ** We start the motor by setting the enable to High and setting the Duty Cycle to 70. The motor will run for 5 seconds.** | ||
- | Nous démarrons le moteur en plaçant Enable à HIGH et en réglant le rapport cyclique à 70%. le moteur tournera pendant 5 secondes. | + | Nous démarrons le moteur en plaçant Enable à HIGH et en réglant le rapport cyclique à 70 %. Le moteur tournera pendant 5 secondes. |
** Now, we stop the motor by setting enable to low.** | ** Now, we stop the motor by setting enable to low.** | ||
Ligne 37: | Ligne 37: | ||
** We now set the motor to reverse (pin 23 to low and starting the PWM duty cycle to 50% and run for 5 seconds…** | ** We now set the motor to reverse (pin 23 to low and starting the PWM duty cycle to 50% and run for 5 seconds…** | ||
- | Nous inversons le sens de rotation du moteur (picot 23 à LOW et démarrage avec un rapport cyclique de 50%) et tournons pendant 5 secondes… | + | Nous inversons le sens de rotation du moteur (picot 23 à LOW et démarrage avec un rapport cyclique de 50 %) et tournons pendant 5 secondes… |
nspython12/commentaires.1499261258.txt.gz · Dernière modification : 2017/07/05 15:27 de d52fr