Modifications

Sauter à la navigation Sauter à la recherche
Ligne 184 : Ligne 184 :  
== Lire les boutons ==
 
== Lire les boutons ==
   −
You'll be writing a sketch that prints the button presses to the screen.
+
Nous allons écrire un croquis/sketch qui affiche le bouton pressé sur l'écran.
   −
First, you need to include the Robot library.  
+
Pour commencer, vous devez inclure la librairie du robot.  
    
   <nowiki>#include <ArduinoRobot.h></nowiki>
 
   <nowiki>#include <ArduinoRobot.h></nowiki>
   −
In setup(), start the robot and the screen.  
+
Dans le fonction ''setup()'', il fait "démarrer" le robot et l'écran.
    
  <nowiki>void setup(){
 
  <nowiki>void setup(){
   Robot.begin();
+
   Robot.begin();  
 
   Robot.beginLCD();
 
   Robot.beginLCD();
 
}</nowiki>
 
}</nowiki>
 +
 +
<small>Un petit peu d'anglais: "begin" signifie ''débuter''/''commencer''.</small>
    
In loop(), every 100ms, read the state of the buttons. If one is being pressed, write the name to the screen.  
 
In loop(), every 100ms, read the state of the buttons. If one is being pressed, write the name to the screen.  
Ligne 204 : Ligne 206 :  
}</nowiki>
 
}</nowiki>
   −
In the ''explore'' folder of the robot examples, there is a sketch called ''Logo'', which incorporates this example with the robot movement from above.  
+
In the ''explore'' folder of the robot examples, there is a sketch called ''Logo'', which incorporates this example with the robot movement from above.
    
== Changer la vitesse moteur avec le potentiomètre ==
 
== Changer la vitesse moteur avec le potentiomètre ==
29 836

modifications

Menu de navigation