Modifications

Sauter à la navigation Sauter à la recherche
3 685 octets ajoutés ,  22 juin 2012 à 06:51
Ligne 10 : Ligne 10 :       −
Produit disponible chez MC Hobby:
+
=== Produits disponibles ===
 +
Les produits ci-dessous sont disponibles (''en stock'') chez [http://www.mchobby.be] MC Hobby. Pensez à visiter notre WebShop... la liste ci-dessous n'est peut être pas encore à-jour ;-)
 +
 
 
*  [https://github.com/adafruit/TFTLCD-Library Adafruit_TFTLCD], pour l'[http://mchobby.be/PrestaShop/product.php?id_product=16 écran tactile 2.8" TFT pour Arduino], un shield AdaFruit.
 
*  [https://github.com/adafruit/TFTLCD-Library Adafruit_TFTLCD], pour l'[http://mchobby.be/PrestaShop/product.php?id_product=16 écran tactile 2.8" TFT pour Arduino], un shield AdaFruit.
       +
=== Produits disponibles sur commande ===
 
Produit que [http://www.mchobby.be MC Hobby] importe sur demande.
 
Produit que [http://www.mchobby.be MC Hobby] importe sur demande.
   Ligne 25 : Ligne 28 :  
* [https://github.com/adafruit/Adafruit-SSD1331-OLED-Driver-Library-for-Arduino Adafruit-SSD1331-OLED-Driver-Library-for-Arduino] pour l'écran [http://www.adafruit.com/products/684  OLED couleur 16 bits de 0.96" w/microSD] d'AdaFruit.
 
* [https://github.com/adafruit/Adafruit-SSD1331-OLED-Driver-Library-for-Arduino Adafruit-SSD1331-OLED-Driver-Library-for-Arduino] pour l'écran [http://www.adafruit.com/products/684  OLED couleur 16 bits de 0.96" w/microSD] d'AdaFruit.
 
* [https://github.com/adafruit/Adafruit_SSD1306 Adafruit_SSD1306] pour l'écran [https://www.adafruit.com/products/326 OLEDs Monochrome 128x64] et [https://www.adafruit.com/products/661 OLEDs Monochrome 128x32] d'AdaFruit.
 
* [https://github.com/adafruit/Adafruit_SSD1306 Adafruit_SSD1306] pour l'écran [https://www.adafruit.com/products/326 OLEDs Monochrome 128x64] et [https://www.adafruit.com/products/661 OLEDs Monochrome 128x32] d'AdaFruit.
 +
 +
Les librairies sont écrites en C++ pour Arduino mais peuvent être facilement portée vers n'importe quel microcontrôleur en ré-écrivant les fonctions de bas-niveau contrôlant les broches/pins.
 +
 +
== Coordonnées système et unités ==
 +
Pixels — picture elements, the blocks comprising a digital image — are addressed by their horizontal (X) and vertical (Y) coordinates. The coordinate system places the origin (0,0) at the top left corner, with positive X increasing to the right and positive Y increasing downward. This is upside-down relative to the standard Cartesian coordinate system of mathematics, but is established practice in many computer graphics systems (a throwback to the days of raster-scan CRT graphics, which worked top-to-bottom). To use a tall “portrait” layout rather than wide “landscape” format, or if physical constraints dictate the orientation of a display in an enclosure, one of four rotation settings can also be applied, indicating which corner of the display represents the top left.
 +
 +
Also unlike the mathematical Cartesian coordinate system, points here have dimension — they are always one full integer pixel wide and tall.
 +
 +
[[Fichier:GLX-coordsys.jpg]]
 +
 +
Coordinates are always expressed in pixel units; there is no implicit scale to a real-world measure like millimeters or inches, and the size of a displayed graphic will be a function of that specific display’s dot pitch or pixel density. If you’re aiming for a real-world dimension, you’ll need to scale your coordinates to suit. Dot pitch can often be found in the device datasheet, or by measuring the screen width and dividing the number of pixels across by this measurement.
 +
 +
For color-capable displays, colors are represented as unsigned 16-bit values. Some displays may physically be capable of more or fewer bits than this, but the library operates with 16-bit values…these are easy for the Arduino to work with while also providing a consistent data type across all the different displays. The primary color components — red, green and blue — are all “packed” into a single 16-bit variable, with the most significant 5 bits conveying red, middle 6 bits conveying green, and least significant 5 bits conveying blue. That extra bit is assigned to green because our eyes are most sensitive to green light. Science!
 +
 +
[[Fichier:GLX-colorpack.jpg]]
 +
 +
For the most common primary and secondary colors, we have this handy cheat-sheet that you can include in your own code. Of course, you can pick any of 65,536 different colors, but this basic list may be easiest when starting out:
 +
 +
// définition des couleurs (mot clé en anglais)
 +
#define BLACK    0x0000 // noir
 +
#define BLUE    0x001F // Bleu
 +
#define RED      0xF800 // Rouge
 +
#define GREEN    0x07E0 // Vert
 +
#define CYAN    0x07FF // Cyan
 +
#define MAGENTA  0xF81F // Magenta
 +
#define YELLOW  0xFFE0 // Jaune
 +
#define WHITE    0xFFFF // Blanc
 +
 +
For monochrome (single-color) displays, colors are always specified as simply 1 (set) or 0 (clear). The semantics of set/clear are specific to the type of display: with something like a luminous OLED display, a “set” pixel is lighted, whereas with a reflective LCD display, a “set” pixel is typically dark. There may be exceptions, but generally you can count on 0 (clear) representing the default background state for a freshly-initialized display, whatever that works out to be.
 +
 +
== Primitives graphiques ==
 +
xxx
    
== Références ==
 
== Références ==
30 894

modifications

Menu de navigation