Modifications

Sauter à la navigation Sauter à la recherche
92 octets ajoutés ,  28 avril 2015 à 20:37
Ligne 36 : Ligne 36 :  
{{MPImage|MicroPython-Hack-fading-01.png}}
 
{{MPImage|MicroPython-Hack-fading-01.png}}
   −
By examining the Quick reference for the pyboard, we see that X1 is connected to channel 1 of timer 5 (TIM5 CH1). Therefore we will first create a Timer object for timer 5, then create a TimerChannel object for channel 1:
+
== Le code ==
 +
By examining the Quick reference for the pyboard, we see that X1 is connected to canal 1  (''channel 1'') du Timer 5 (noté ''TIM5 CH1'' sur le schéma).
 +
 
 +
{{MPImage|pybv10-pinout.jpg|640px}}
 +
 
 +
Therefore we will first create a Timer object for timer 5, then create a TimerChannel object for channel 1:
    
  <nowiki>from pyb import Timer
 
  <nowiki>from pyb import Timer
29 917

modifications

Menu de navigation