Modifications
Sauter à la navigation
Sauter à la recherche
← Modification précédente
Modification suivante →
ENG-CANSAT-PICO-HowTo
(voir la source)
Version du 21 février 2022 à 02:07
232 octets ajoutés
,
21 février 2022 à 02:07
→Print and Waits
Ligne 6 :
Ligne 6 :
== Print and Waits ==
== Print and Waits ==
This first example how to output text with {{fname|print()}} and wait a moment with {{fname|sleep()}} .
This first example how to output text with {{fname|print()}} and wait a moment with {{fname|sleep()}} .
+
+
<syntaxhighlight lang="python">
+
from time import sleep, sleep_ms
+
+
for x in range( 10 ):
+
print( "Value %i" % x )
+
sleep( 0.5 ) # half second
+
</syntaxhighlight>
+
+
You can also sleep for milliseconds with {{fname|sleep_ms(x)}}
== Control an output ==
== Control an output ==
Admin
Bureaucrates
,
Administrateurs
30 711
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