Modifications

Sauter à la navigation Sauter à la recherche
487 octets ajoutés ,  28 septembre 2013 à 09:22
aucun résumé de modification
Ligne 1 : Ligne 1 :  
{{ADF-LED-BACKPACK-NAV}}
 
{{ADF-LED-BACKPACK-NAV}}
  −
{{traduction}}
      
{{bloc-etroit
 
{{bloc-etroit
Ligne 13 : Ligne 11 :  
}}
 
}}
   −
[[Fichier:ADF-LED-BACKPACK-7SEG-10.jpg|550px]]
+
{{ADFImage|ADF-LED-BACKPACK-7SEG-10.jpg|550px}}
 +
 
 +
<small>''Toutes les images ci-dessous: crédit [http://www.adafruit.com AdaFruit Industries]''</small>
    
{{asm-begin}}
 
{{asm-begin}}
Ligne 43 : Ligne 43 :  
Voila, vous êtes maintenant prêt à utiliser le firmware!
 
Voila, vous êtes maintenant prêt à utiliser le firmware!
   −
== Programmation du Backpack 7-Segment ==
+
== Programmation du Backpack 7-Segments ==
    
'''AdaFruit à écrit une librairie pour vous aider à utiliser le backpack 7-segments. La librairie est écrite pour Arduino et fonctionnera avec n'importe quel Arduino puisqu'il n'utilise que le bus I2C. C'est un code portable qui devrait être facilement adapté pour d'autres micro-controleurs.''''
 
'''AdaFruit à écrit une librairie pour vous aider à utiliser le backpack 7-segments. La librairie est écrite pour Arduino et fonctionnera avec n'importe quel Arduino puisqu'il n'utilise que le bus I2C. C'est un code portable qui devrait être facilement adapté pour d'autres micro-controleurs.''''
Ligne 64 : Ligne 64 :  
Redémarrez votre Arduino IDE.
 
Redémarrez votre Arduino IDE.
   −
{{traduction}}
+
Une fois que vous avez redémarrez, vous devriez être capable de sélectionner le sketch d'exemple '''File > Examples > Adafruit_LEDBackpack > sevenseg'''. Chargez le sur votre Arduino comme vous le faite d'habitude. Vous devriez vois i, programme de test qui exécute toute une série de routine.
 +
 
 +
{{ADFImage|ADF-LED-BACKPACK-7SEG-10.jpg|450px}}
   −
Once you've restarted you should be able to select the '''File > Examples > Adafruit_LEDBackpack > sevenseg''' example sketch. Upload it to your Arduino as usual. You should see a basic test program that goes through a bunch of different routines.
+
Une fois que la matrice fonctionne (super!), vous pouvez écrire vos propres sketchs.
   −
[[Fichier:ADF-LED-BACKPACK-7SEG-10.jpg|450px]]
+
== Méthodes d'affichage ==
   −
Once you're happy that the matrix works, you can write your own sketches.
+
Voici quelques méthodes pour afficher des informations. La plus simple c'est d'appeller '''print''' - comme vous le faites avec '''Serial'''
   −
There's a few ways you can draw to the display. The easiest is to just call '''print''' - just like you do with '''Serial'''
+
* '''print(variable,HEX)''' - Affiche un nombre hexadécimal de 0000 jusqu'à FFFF
 +
* '''print(variable,DEC)''' ou '''print(variable)''' - Affiche un entier décimal, de 0000 à 9999
   −
* '''print(variable,HEX)''' - this will print a hexidecimal number, from 0000 up to FFFF
+
Si vous avez besoin de plus de contrôle, vous pouvez appeller '''writeDigitNum(position, nombre)''' - qui écrit un chiffre (de 0 à 9) sur une position de l'afficheur. La position #0 est sur la gauche, la position #2 correspond au deux point ":" (vous n'en aurez probablement pas besoin), la position #4 est tout à fait à droite.
* p'''rint(variable,DEC)''' or '''print(variable)''' - this will print a decimal integer, from 0000 up to 9999
     −
If you need more control, you can call '''writeDigitNum(location, number)''' - this will write the number (0-9) to a single location. Location #0 is all the way to the left, location #2 is the colon dots so you probably want to skip it, location #4 is all the way to the right. If you want a decimal point, call '''writeDigitNum(location, number, true)''' which will paint the decimal point. To draw the colon, use '''drawColon(true or false)'''
+
Si vous désirez un point décimal, appelez '''writeDigitNum(position, nombre, true)''' qui affichera un point décimal. Pour afficher les deux points ":", utilisez la fonction '''drawColon(true ou false)'''
   −
If you wnat even more control, you can call '''writeDigitRaw(location,bitmask)''' to draw a raw 8-bit mask (as stored in a uint8_t) to that location.
+
Si vous désirez encore plus de contrôle, vous pouvez utiliser '''writeDigitRaw(position,bitmask)''' pour activer les segments en fonction d'un masque 8 bits (''8-bit mask'' en anglais) stocké dans un uint8_t (pour la position mentionnée).
   −
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 effectuent des modifications dans la mémoire d'Arduino. N'oubliez pas d'appeler '''writeDisplay()''' pour "sauver" le contenu de la mémoire dans l'afficheur l'afficheur via le bus I2C.
   −
There are also a few small routines that are special to the backpack:
+
Il y a également quelques routines qui sont propre au BackPack:
   −
* '''setBrightness(brighness)'''- 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é)'''- vous permettra de modifier la luminosité de l'afficheur. 0 pour le moins lumineux, 15 pour le plus lumineux. 15 est la valeur utilisée par l'afficheur lorsqu'il démarre.
* '''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 (''bink'' en anglais) l'afficheur tout entier. 0 pour arrêter le clignotement. 1, 2 ou 3 pour les différentes vitesses de clignotement.
    
{{ADF-LED-BACKPACK-TRAILER}}
 
{{ADF-LED-BACKPACK-TRAILER}}
29 917

modifications

Menu de navigation