Différences entre versions de « ADF-LED-BACKPACK-8x8-Bicolor »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 35 : Ligne 35 :
  
 
{{asm-row|img=ADF-LED-BACKPACK-MATRICE-BI-04.jpg}}
 
{{asm-row|img=ADF-LED-BACKPACK-MATRICE-BI-04.jpg}}
{{asm-text}} Turn the backpack over so its sitting flat on the matrix.
+
{{asm-text}} Retourner le "backpack + matrice" et assurez vous que le backpack est bien à plat sur la matrice.
  
 
{{asm-row|img=ADF-LED-BACKPACK-MATRICE-BI-05.jpg}}
 
{{asm-row|img=ADF-LED-BACKPACK-MATRICE-BI-05.jpg}}
{{asm-text}} Solder all 24 pins.
+
{{asm-text}} Soudez les 24 broches.
  
 
{{asm-row|img=ADF-LED-BACKPACK-MATRICE-BI-06.jpg}}
 
{{asm-row|img=ADF-LED-BACKPACK-MATRICE-BI-06.jpg}}
 
{{asm-img|img=ADF-LED-BACKPACK-MATRICE-BI-07.jpg}}
 
{{asm-img|img=ADF-LED-BACKPACK-MATRICE-BI-07.jpg}}
{{asm-text}} Clip the long pins
+
{{asm-text}} Couper les broches au dessus de la soudure (pour les raccourcir).
  
 
{{asm-row|img=ADF-LED-BACKPACK-MATRICE-BI-08.jpg}}
 
{{asm-row|img=ADF-LED-BACKPACK-MATRICE-BI-08.jpg}}
{{asm-text}} Now you're ready to wire it up to a microcontroller. We'll assume you want to use a 4pin header. You can also of course solder wires directly. Place a 4-pin piece of header with the LONG pins down into the breadboard.
+
{{asm-text}} Vous êtes maintenant prêt à vous raccorder sur un microcontrôleur. Nous partons du principe que vous allez utiliser le pinHeader à 4 broches. Vous pouvez, bien entendu, souder des fils directement sur la carte.  
 +
 
 +
Placez une section de 4 broches en enfonçant la partie LONGUE dans le breadboard.
  
 
{{asm-row|img=ADF-LED-BACKPACK-MATRICE-BI-09.jpg}}
 
{{asm-row|img=ADF-LED-BACKPACK-MATRICE-BI-09.jpg}}
{{asm-text}} Place the soldered backpack on top of the header.
+
{{asm-text}} Placez ensuite le backpack que vous venez de souder au dessus de header (voir l'image).
  
 
{{asm-row|img=ADF-LED-BACKPACK-MATRICE-BI-10.jpg}}
 
{{asm-row|img=ADF-LED-BACKPACK-MATRICE-BI-10.jpg}}
{{asm-text}} Solder 'em!
+
{{asm-text}} soudez le
  
 
{{asm-end}}
 
{{asm-end}}
  
== Bi-Color 8x8 LED Backpack Firmware ==
+
== 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.
 
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.

Version du 5 février 2013 à 22:33

Matrice 8x8 Bi-Couleur

Cette version du backpack est conçu pour ces matrices 8x8 carrés avec LEDs couleurs. Ces matrices disposent de 64 LEDs rouges et 64 LEDs vertes à l'intérieur, ce qui fait un total de 128 LEDs contrôlées comme une matrice 8x16. Ce backpack résout l'épineux problème d'utiliser 24 broches d'un microcontroleur (et une tonne de fils) pour contrôler la matrice. Mieux encore, controleur du backpack situé à l'arrière de la carte dispose d'une interface I2C et d'un controleur à courant constant (pour un éclairage parfait en toute circonstance)... il prend soin de tout, contrôlant les 128 LEDs en tâche de fonds.

Tout ce que vous avez à faire, c'est d'écrire les données en utilisant l'interface I2C qui ne nécessite que 2-broches/pins. Il dispose de 3 ponts à souder (jumper) permettant de sélectionner une des 8 adresses... ce qui permet de contrôler jusqu'à 8 matrices sur un seul bus I2C. Vous pouvez bien entendu raccorder d'autres composants I2C et senseurs sur ce bus I2C.

Le contrôleur permet de contrôler la luminosité de l'afficheur par pas de 1/16 de la luminescence maximale (donc de 1/16 de puissance jusqu'à pleine puissance). Il est a noter que le réglage de la luminosité est global pour tout l'afficheur... et non LED à LED.

ADF-LED-BACKPACK-MATRICE-BI-01.jpg

ADF-LED-BACKPACK-MATRICE-BI-02.jpg Lorsque vous achetez ce pack, il est fournit avec un backpack assemblé et testé (tout comme la matrice 8x8). Vous aurez besoin de souder la matrice sur le backpack mais c'est une opération facile à réaliser.


ADF-LED-BACKPACK-MATRICE-BI-03.jpg Retirez les différents éléments du sachet et placez la matrice LED au dessus de face portant la sérigraphie.

La matrice doit être soudée correctement (dans le bon sens) sinon elle ne fonctionnera pas! Cherchez la face de la matrice qui présente des information imprimées. Ensuite, regardez la sérigraphie de la carte... il y a un coin où la case porte un cercle à la place des carrés. Placez la carte et le coin comme montré sur l'image et placez ensuite la matrice comme présenté.

Ne soudez pas la matrice du dessus du controleur - cela ne fonctionnera pas! La matrice doit absolument être soudée au dessus de la sérigraphie (comme présenté sur l'image).

ADF-LED-BACKPACK-MATRICE-BI-04.jpg Retourner le "backpack + matrice" et assurez vous que le backpack est bien à plat sur la matrice.
ADF-LED-BACKPACK-MATRICE-BI-05.jpg Soudez les 24 broches.
ADF-LED-BACKPACK-MATRICE-BI-06.jpg


ADF-LED-BACKPACK-MATRICE-BI-07.jpg

Couper les broches au dessus de la soudure (pour les raccourcir).
ADF-LED-BACKPACK-MATRICE-BI-08.jpg Vous êtes maintenant prêt à vous raccorder sur un microcontrôleur. Nous partons du principe que vous allez utiliser le pinHeader à 4 broches. Vous pouvez, bien entendu, souder des fils directement sur la carte.

Placez une section de 4 broches en enfonçant la partie LONGUE dans le breadboard.

ADF-LED-BACKPACK-MATRICE-BI-09.jpg Placez ensuite le backpack que vous venez de souder au dessus de header (voir l'image).
ADF-LED-BACKPACK-MATRICE-BI-10.jpg soudez le

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.

Wiring to the matrix is really easy

  • Connect CLK to the I2C clock - on Arduino UNO thats Analog #5, on the Leonardo its Digital #3, on the Mega its digital #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
  • Connect GND to common ground
  • Connect VCC+ to power - 5V is best but 3V also seems to work for 3V microcontrollers.

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.

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

ADF-LED-BACKPACK-MATRICE-BI-01.jpg

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].

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.

There are also a few small routines that are special to the matrix:

  • 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
  • blinkRate(rate) - You can blink the entire display. 0 is no blinking. 1, 2 or 3 is for display blinking.



Source: Control small led matrice with ease créé par LadyAda pour AdaFruit Industries. Crédit AdaFruit Industries

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.