Modifications

Sauter à la navigation Sauter à la recherche
73 octets ajoutés ,  18 avril 2015 à 20:02
Ligne 52 : Ligne 52 :     
== Le callback du Timer ==
 
== Le callback du Timer ==
The next thing we can do is register a callback function <small>([[Glossaire#C|Glossaire lettre C]])</small> for the timer to execute when it triggers (see the [switch tutorial](tut-switch) for an introduction to callback functions):
+
La prochaine chose à faire est d'enregistrer une fonction de rappel (dite ''callback'' <small>([[Glossaire#C|Glossaire lettre C]])</small>) de sorte que le ''timer'' l'exécute à chaque déclenchement (voyez notre tutoriel see the [switch tutorial](tut-switch) for an introduction to callback functions):
    
  <nowiki>>>> tim.callback(lambda t:pyb.LED(1).toggle())</nowiki>
 
  <nowiki>>>> tim.callback(lambda t:pyb.LED(1).toggle())</nowiki>
29 917

modifications

Menu de navigation