Modifications

Sauter à la navigation Sauter à la recherche
334 octets ajoutés ,  16 août 2016 à 20:00
Ligne 21 : Ligne 21 :     
= Tests =
 
= Tests =
 +
Vous pouvez tester facilement toutes ces fonctionnalités en utilisant [[MicroPython-Hack-REPL|le mode REPL]] et en saisissant les lignes suivantes une à une.
 +
 
== Marche avant/arrière ==
 
== Marche avant/arrière ==
 
[[Fichier:RB-2-WHEEL-MOVE-00.jpg|480px]]
 
[[Fichier:RB-2-WHEEL-MOVE-00.jpg|480px]]
Ligne 54 : Ligne 56 :     
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
 +
from r2wheel import Robot2Wheel
 
r2 = Robot2Wheel()  
 
r2 = Robot2Wheel()  
 
r2.turn( Robot2Wheel.RIGHT_ROTATE )
 
r2.turn( Robot2Wheel.RIGHT_ROTATE )
Ligne 69 : Ligne 72 :  
Il existe des méthodes plus directe pour tourner sur place à droite ou à gauche.
 
Il existe des méthodes plus directe pour tourner sur place à droite ou à gauche.
   −
x
+
<syntaxhighlight lang="python">
 
+
from r2wheel import Robot2Wheel
 +
r2 = Robot2Wheel()
 +
r2.right()
 +
r2.halt()
 +
r2.left()
 +
r2.halt()
 +
</syntaxhighlight>
    
Voyez la section [[Hack-MotorSkin-Tester#D.C3.A9pannage|dépannage]] si l'un des moteurs ne tourne pas dans le bon sens.
 
Voyez la section [[Hack-MotorSkin-Tester#D.C3.A9pannage|dépannage]] si l'un des moteurs ne tourne pas dans le bon sens.
29 879

modifications

Menu de navigation