Modifications

Sauter à la navigation Sauter à la recherche
aucun résumé de modification
Ligne 5 : Ligne 5 :     
== Un exemple simple ==
 
== Un exemple simple ==
You should be able to get two Arduino boards with Wireless shields talking to each other without any configuration, using just the standard Arduino serial commands (described in the reference).
+
Vous devriez être capable de permettre à deux Arduino équipés de Wireless shield de dialoguer ensemble dans aucune opération de configuration, simplement en utilisant les commande de communication série d'Arduino (serial).
   −
To upload a sketch to an Arduino board with a Wireless shield, remove the Xbee. Then, you can upload a sketch normally from the Arduino environment. In this case, upload the '''Communication | Physical Pixel''' sketch to one of the boards. This sketch instructs the board to turn on the LED attached to pin 13 whenever it receives an 'H' over its serial connection, and turn the LED off when it gets an 'L'. You can test it by connecting to the board with the Arduino serial monitor (be sure it's set at 9600 baud), typing an H, and pressing enter (or clicking send). The LED should turn on. Send an L and the LED should turn off. If nothing happens, you may have an Arduino board that doesn't have a built-in LED on pin 13 (see the board index to check for sure), in this case you'll need to supply your own.
+
To charger un sketch sur un Arduino avec un Wireless shield, vous devez retirer le module Xbee. Ensuite, vous pouvez charger normalement un sketch (programme) Arduino depuis l'environnement Arduino IDE.
   −
Once you've uploaded the Physical Pixel sketch and made sure that it's working, unplug the first Arduino board from the computer. Change the switch to the Micro setting. Now, you need to upload a sketch to the other board. Make sure its switch is in the USB setting. Then upload the following sketch to the board:  
+
Dans notre cas d'utilisation, chargez le sketch '''Communication | Physical Pixel''' sur une des cartes.<br />
 +
Ce sketch indique à la carte d'allumer la LED raccordée sur la broche 13 (pin 13) lorsqu'elle reçoit un H sur la connecxion série... et éteind la LED si un 'L' est recu sur la connexion série.
 +
 
 +
Vous pouvez tester ce programme en raccordant/utilisant la carte Arduino sur le moniteur série d'Arduino IDE (en utilisant une communication à 9600 bauds bien entendu). Tapez un H, et pressé la touche "entrée" (ou cliquez sur Send). La LED devrait s'allumer. <br />
 +
Envoez ensuite un L et la LED devrait s'éteindre. Si rien ne se passe c'est que votre carte Arduino ne contient probablement pas de LED (sur la carte) attachée à la broche 13 (vous pouvez vérifier l'[http://arduino.cc/en/Main/Boards index des cartes Arduino] pour plus d'information). Si la carte ne dispose pas d'une LED sur la broche 13, vous devrez alors y brancher votre propre LED..
 +
 
 +
Une fois que vous avez téléchargé le sketch Physical Pixel et que vous êtes certains qu'il fonctionne bien: débranché la première carte Arduino de l'ordinateur. Placez ensuite le switch/interrupteur sur "Micro".  
 +
 
 +
Maintenant, vous allez devoir télécharger un autre sketch sur l'autre Arduino. Assurez vous que l'interrupteur est bien placé sur USB. Ensuite charger le programme suivant sur votre Arduino:  
 
  <nowiki>void setup()
 
  <nowiki>void setup()
 
{
 
{
Ligne 23 : Ligne 31 :  
}</nowiki>
 
}</nowiki>
   −
When it's finished uploading, you can check that it's working with the Arduino serial monitor. You should see H's and L's arriving one a second. Turn off the serial monitor and unplug the board. Change the switch to the Micro setting. Now connect both boards to power. After a few seconds, you should see the LED on the first board turn on and off, once a second. (This is the LED on the Arduino board itself, not the one on the Xbee shield, which conveys information about the state of the Xbee module.) If so, congratulations, your Arduino boards are communicating wirelessly.  
+
Quand le téléchargement est terminé, vous pouvez vérifier dans le moniteur série d'Arduino IDE que le programme fonctionne correctement. Vous devriez voir des alternances de H et L apparaître seconde après seconde.  
 +
 
 +
Fermé votre moniteur série et débranchez ensuite votre carte. Change the switch to the Micro setting. Now connect both boards to power. After a few seconds, you should see the LED on the first board turn on and off, once a second. (This is the LED on the Arduino board itself, not the one on the Xbee shield, which conveys information about the state of the Xbee module.) If so, congratulations, your Arduino boards are communicating wirelessly.  
    
== A Few Notes ==
 
== A Few Notes ==
29 917

modifications

Menu de navigation