Modifications
Sauter à la navigation
Sauter à la recherche
← Modification précédente
Modification suivante →
ENG-CANSAT-PICO-HowTo
(voir la source)
Version du 23 février 2022 à 23:29
287 octets ajoutés
,
23 février 2022 à 23:29
→PWM Output
Ligne 133 :
Ligne 133 :
[[Fichier:ENG-CANSAT-FEATHER-PICO-pwm-01.png]]
[[Fichier:ENG-CANSAT-FEATHER-PICO-pwm-01.png]]
−
The average voltage of PWM signal depend on the duty cycle: Vavg = 3.3V * Th /
P
+
The average voltage
(average power)
of PWM signal depend on the duty cycle: Vavg = 3.3V * Th /
T
−
The onboard LED is tied to the GPIO 25. And that GPIO 25 can also be controled with PWM
.
+
[[Fichier:ENG-CANSAT-FEATHER-PICO-pwm-02
.
png|800px]]
−
Thank to PWM we can control the
effective
luminosity
of the LED by setting-up
the duty cycle
of the PWM signal
.
+
Obviously, a 0% duty cyle is equivalent to a LOW signal whereas a 100% duty cycle is a HIGH signal.
+
+
In the following example, we will use PWM to dim the light on the onbloard LED.
+
+
The onboard LED is tied to the GPIO 25 (and PWM will work there as with other GPIOs).
+
+
Thank to PWM we can
effectively
control the
LED
luminosity
(very low duty cycle will dim
the
light while highest
duty cycle
will make it brightest)
.
<syntaxhighlight lang="python">
<syntaxhighlight lang="python">
Admin
Bureaucrates
,
Administrateurs
29 918
modifications
Menu de navigation
Outils personnels
Se connecter
Espaces de noms
Page
Discussion
Variantes
Affichages
Lire
Voir le texte source
Voir l’historique
Plus
Rechercher
Navigation
ARDUINO
RASPBERRY-PI
[:: PI Hacking ::]
Particle.IO
Micro Python
Imprimante 3D
Actualités
Modifications récentes
Page au hasard
Aide
Outils
Pages spéciales
Version imprimable