Ligne 1 : |
Ligne 1 : |
| {{NeoPixel-UserGuide-NAV}} | | {{NeoPixel-UserGuide-NAV}} |
| | | |
| + | {{ADFImage|NeoPixel-UserGuide-NeoMatrix-01.jpg|640px}} |
| + | |
| + | The Adafruit_NeoMatrix library builds upon Adafruit_NeoPixel to create two-dimensional graphic displays using NeoPixels. You can then easily draw shapes, text and animation without having to calculate every X/Y pixel position. Small NeoPixel matrices are available in the shop. Larger displays can be formed using sections of NeoPixel strip, as shown in the photo above. |
| + | |
| + | In addition to the Adafruit_NeoPixel library (which was already downloaded and installed in a prior step), NeoMatrix requires two additional libraries: |
| + | |
| + | # [https://github.com/adafruit/Adafruit_NeoMatrix/archive/master.zip Adafruit_NeoMatrix] |
| + | # [https://github.com/adafruit/Adafruit-GFX-Library/archive/master.zip Adafruit_GFX] |
| + | |
| + | If you’ve previously used any Adafruit LCD or OLED displays, you might already have the latter library installed. |
| + | |
| + | Installation for both is similar to Adafruit_NeoPixel before: unzip, make sure the folder name matches the .cpp and .h files within, then move to your Arduino libraries folder and restart the IDE. |
| + | Arduino sketches need to include {{underline|all three headers}} just to use this library: |
| + | |
| + | <nowiki> #include <Adafruit_GFX.h> |
| + | #include <Adafruit_NeoMatrix.h> |
| + | #include <Adafruit_NeoPixel.h> |
| + | #ifndef PSTR |
| + | #define PSTR // Make Arduino Due happy |
| + | #endif</nowiki> |
| + | The extra ifdef/define/endif lines are only needed if you’re using an Arduino Due. Otherwise they can be left out. |
| | | |
| {{NeoPixel-UserGuide-TRAILER}} | | {{NeoPixel-UserGuide-TRAILER}} |