Modifications

Sauter à la navigation Sauter à la recherche
189 octets ajoutés ,  16 août 2016 à 20:51
Ligne 146 : Ligne 146 :  
=== Lire la distance ===
 
=== Lire la distance ===
 
La fonction {{fname|distance()}} permet de lire la distance '''en centimètre'''.
 
La fonction {{fname|distance()}} permet de lire la distance '''en centimètre'''.
 +
 +
<syntaxhighlight lang="python">
 +
from r2wheel import Robot2Wheel
 +
r2 = Robot2Wheel()
 +
r2.turn(Robot2Wheel.RIGHT_BEND, speed=40)
 +
print( 'distance = %i cm' % r2.distance() )
 +
</syntaxhighlight>
    
== Boutons utilisateurs ==
 
== Boutons utilisateurs ==
29 861

modifications

Menu de navigation