Modifications

Sauter à la navigation Sauter à la recherche
175 octets ajoutés ,  27 décembre 2014 à 21:31
aucun résumé de modification
Ligne 3 : Ligne 3 :  
{{traduction}}
 
{{traduction}}
   −
{{bloc-etroit|text=You can write whole apps and flash them remotely from the command line just as you would from the build IDE. Let's write a small blink sketch to try it out.
+
{{bloc-etroit|text=Vous pouvez également utiliser la ligne de commande pour créer une application puis la flasher à distance avec <code>spark flash</code> pour obtenir un résultat identique à celui obtenu avec l'IDE build.
   −
Copy and paste the following program into a file called '''blinky.ino'''}}
+
Ecrivons un petit programme "blinky" (clignotement) pour essayer.
   −
  <nowiki>#Copy me to blinky.ino
+
Copiez et collez le programme suivant dans un fichier nommé '''blinky.ino'''}}
−
#define PIN D7
+
 
 +
  <nowiki>#Copiez moi dans blinky.ino
 +
#DEFINE PIN D7
 
int state = 0;
 
int state = 0;
    
void setup() {
 
void setup() {
−
     //tell the core we want to write to this pin
+
     //Informons le core que nous voulons écrire sur cette broche
 
     pinMode(PIN, OUTPUT);
 
     pinMode(PIN, OUTPUT);
 
}
 
}
 
void loop() {
 
void loop() {
−
     //alternate the PIN between high and low
+
     //alterner l'état de la broche entre niveau haut (high) et bas (low)
 
     digitalWrite(PIN, (state) ? HIGH : LOW);
 
     digitalWrite(PIN, (state) ? HIGH : LOW);
   −
     //invert the state
+
     //inverser l'état
 
     state = !state;
 
     state = !state;
  
32 920

modifications

Menu de navigation