Modifications

Sauter à la navigation Sauter à la recherche
725 octets ajoutés ,  5 février 2013 à 23:01
Ligne 59 : Ligne 59 :  
== Le Firmware du Backpack 8x8 LEDs couleur ==
 
== Le Firmware du Backpack 8x8 LEDs couleur ==
   −
We wrote a basic library to help you work with the bi-color 8x8 matrix backpack. The library is written for the Arduino and will work with any Arduino as it just uses the I2C pins. The code is very portable and can be easily adapted to any I2C-capable micro.
+
AdaFruit à développé une librairie de base pour vous aider à contrôler cette matrice 8x8. La librairie est écrite pour Arduino et fonctionne avec tous les Arduino puisqu'il utilise des broches du bus I2C. Le code est portable et devrait pouvoir être adapté facilement sur n'importe quel matériel supportant I2C.
   −
Wiring to the matrix is really easy
+
Raccorder la matrice est est vraiment simple:
   −
* Connect '''CLK''' to the I2C clock - on Arduino UNO thats Analog #5, on the Leonardo its Digital #3, on the Mega its digital #21
+
* Connectez '''CLK''' sur le signal d'horloge I2C (I2C clock) - Sur un Arduino UNO c'est la broche Analogique #5, sur un Leonardo c'est la broche Digitale #3, sur un Mega c'est la broche Digitale #21
* Connect '''DAT''' to the I2C data - on Arduino UNO thats Analog #4, on the Leonardo its Digital #2, on the Mega its digital #20
+
* Connectez '''DAT''' sur la broche de donnée I2C (I2C data) - Sur un Arduino UNO c'est la broche Analogique #4, sur un Leonardo c'est la broche Digitale #2, sur un Mega c'est la broche digitale #20
* Connect '''GND''' to common ground
+
* Connectez '''GND''' sur la masse commune (GND/ground)
* Connect '''VCC+''' to power - 5V is best but 3V also seems to work for 3V microcontrollers.
+
* Connectez '''VCC+''' sur l'alimentation - 5V convient mieux que 3V même si cela semble fonctionne avec les microcontroleurs 3V.
   −
Next, download the Adafruit LED Backpack library from github . To download click the DOWNLOADS button in the top right corner, rename the uncompressed folder '''Adafruit_LEDBackpack'''. Check that the '''Adafruit_LEDBackpack''' folder contains '''Adafruit_LEDBackpack.cpp''' and '''Adafruit_LEDBackpack.h''' Place the Adafruit_LEDBackpack library folder your ''arduinosketchfolder/'''libraries'''/'' folder. You may need to create the libraries subfolder if its your first library. You'll also need to download the Adafruit GFX library that provides the graphics drawing routines. Restart the IDE.
+
Ensuite, téléchargez la libraire LED Backpack d'AdaFruit depuis github . Pour télécharger, cliquez sur le bouton DOWNLOADS dans le coin supérieur droit. Renommer le répertoire décompressé '''Adafruit_LEDBackpack'''. Vérifiez que le répertoire '''Adafruit_LEDBackpack''' contient les fichiers '''Adafruit_LEDBackpack.cpp''' et '''Adafruit_LEDBackpack.h'''  
   −
Once you've restarted you should be able to select the '''File->Examples->Adafruit_LEDBackpack->bicolor88''' example sketch. Upload it to your Arduino as usual. You should see a basic test program that goes through a bunch of different drawing routines
+
Placez la librairie Adafruit_LEDBackpack dans votre répertoire ''arduinosketchfolder/'''libraries'''/''. Vous pourriez avoir besoin de créer le répertoire 'libraries' si vous installez votre toute première librairie.
 +
 
 +
Vous aurez également besoin de télécharger la libraire Adafruit GFX qui fourni les routines de dessin. Redémarré ensuite votre Arduino IDE.
 +
 
 +
Une fois l'IDE redémarré, vous devriez être capable de sélectionner le sketch d'exemple '''File->Examples->Adafruit_LEDBackpack->bicolor88'''. Chargez le sur votre Arduino comme vous le faite d'habitude. Vous devriez voir le programme de test exécuter toute une série de routines d'affichage.
    
[[Fichier:ADF-LED-BACKPACK-MATRICE-BI-01.jpg|450px]]
 
[[Fichier:ADF-LED-BACKPACK-MATRICE-BI-01.jpg|450px]]
   −
Once you're happy that the matrix works, you can write your own sketches. The 8x8 matrix supports everything the Adafruit GFX library - drawing pixels, lines, rectangles, circles, triangles, roundrects, and small bitmaps. For more details [Tutoriel Librairie Adafruit GFX check out the GFX page which will detail all of the GFX routines].
+
Une fois que vous êtes satisfait du fonctionnement de la matrice, vous pouvez écrire vos propre sketchs. La matrice 8x8 supporte toutes les fonctionnalités de la librairie GFX - afficher des points (pixels), lignes (lines), rectangles, cercles (circles), triangles, rectangle arrondis (roundrects), et de petites images (small bitmaps). Pour plus de détails [Tutoriel Librairie Adafruit GFX|vous pouvez consulter notre tutoriel sur la librairie GFX qui présente toutes les fonctions].
   −
All the drawing routines only change the display memory kept by the Arduino. Don't forget to call '''writeDisplay()''' after drawing to 'save' the memory out to the matrix via I2C.
+
Toutes les routines d'affichage ne font que modifier l'image stockée dans la mémoire d'Arduino. N'oubliez pas d'appeler '''writeDisplay()''' après les opérations de dessin pour 'envoyer' le contenu de la mémoire dans l'afficheur via I2C.
   −
There are also a few small routines that are special to the matrix:
+
Il y a quelques routines qui sont plus spécialement dédiée aux matrices:
* '''setBrightness(brightness)''' - will let you change the overall brightness of the entire display. 0 is least bright, 15 is brightest and is what is initialized by the display when you start
+
* '''setBrightness(luminosité)''' - permet de changer la luminosité globale de l'afficheur. 0 pour le moins lumineux, 15 est le plus lumineux (valeur utilisé à la mise sous tension de l'afficheur).
* '''blinkRate(rate)''' - You can blink the entire display. 0 is no blinking. 1, 2 or 3 is for display blinking.
+
* '''blinkRate(vitesse)''' - permet de faire clignoter l'afficheur dans sont entièreté. 0 = pas de clignotement. 1, 2 ou 3 pour faire clignoter l'afficheur.
       
{{ADF-LED-BACKPACK-TRAILER}}
 
{{ADF-LED-BACKPACK-TRAILER}}
29 917

modifications

Menu de navigation