Modifications

Sauter à la navigation Sauter à la recherche
919 octets ajoutés ,  13 novembre 2014 à 22:17
Ligne 44 : Ligne 44 :  
=== Faire clignoter une LED avec Tinker ===
 
=== Faire clignoter une LED avec Tinker ===
   −
{{traduction}}
+
The Spark app should now be on the Tinker screen, as shown to the right.
 +
 
 +
Cet écran s'appelle "DO" qui en anglais signifie "faire".
 +
 
 +
Cet écran propose plusieurs options:
 +
* '''analogRead''' - pour lecture analogique
 +
* '''analogWrite''' - pour écriture analogique (sortie PWM)
 +
* '''digitalRead''' - pour lecture digital
 +
* '''digitalWrite''' - pour écriture digital
    
{{SPARKImage|Spark.IO-Core-demarrer-04.jpg|320px}}
 
{{SPARKImage|Spark.IO-Core-demarrer-04.jpg|320px}}
 +
 +
Tap <code>D7</code> then <code>digitalWrite</code> in the popup. Now when you tap the <code>D7</code> circle the tiny blue LED should turn off or on! This is because the LED shares a connection to the Core with the pin labeled D7.
 +
 +
You could hook your own LED up to the Core on another pin and do the same thing, use digitalRead to tell that a switch has been pressed, or analogRead to see the position of a knob.
 +
 +
You can always get Tinker back on the Core by following [http://docs.spark.io/#/tinker#tinkering-with-tinker-the-tinker-firmware these instructions].
    
=== Mettre un programme sur votre Core ===
 
=== Mettre un programme sur votre Core ===
29 917

modifications

Menu de navigation