Modifications

Sauter à la navigation Sauter à la recherche
406 octets ajoutés ,  19 avril 2015 à 09:51
aucun résumé de modification
Ligne 2 : Ligne 2 :     
{{traduction}}
 
{{traduction}}
 +
 +
== Contrôle de la consommation ==
 +
 +
{{bloc-etroit|text=
 +
{{fname|pyb.wfi()}} is used to reduce power consumption while waiting for an event such as an interrupt. You would use it in the following situation:
 +
 +
<nowiki>while True:
 +
    do_some_processing()
 +
    pyb.wfi()</nowiki>
 +
 +
Control the frequency using {{fname|pyb.freq()}}:
 +
 +
<nowiki>pyb.freq(30000000) # fixer la fréquence  du CPU à 30MHz</nowiki>
 +
    
{{MicroPython-Hack-Power-TRAILER}}
 
{{MicroPython-Hack-Power-TRAILER}}
29 910

modifications

Menu de navigation