Différences entre versions de « NeoPixel-UserGuide-Arduino »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 17 : Ligne 17 :
 
[[Installation_d'un librairie Arduino|Here’s a tutorial]] that walks through the process of correctly installing Arduino libraries.
 
[[Installation_d'un librairie Arduino|Here’s a tutorial]] that walks through the process of correctly installing Arduino libraries.
  
== Branchement de base ===
+
== Branchement de base ==
 
To get started, let’s assume you have some model of Arduino microcontroller connected to the computer’s USB port. We’ll elaborate on the finer points of powering NeoPixels later, but for now you should use a separate 5V DC power supply (or a 3.7V lithium-ion battery for a Flora wearable project).
 
To get started, let’s assume you have some model of Arduino microcontroller connected to the computer’s USB port. We’ll elaborate on the finer points of powering NeoPixels later, but for now you should use a separate 5V DC power supply (or a 3.7V lithium-ion battery for a Flora wearable project).
  

Version du 24 février 2014 à 14:22


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

Bibliothèque Arduino

Controlling NeoPixels “from scratch” is quite a challenge, so we provide a library letting you focus on the fun and interesting bits. The library works with most mainstream Arduino boards and derivatives: Uno, Mega, Leonardo, Micro, Adafruit Flora, etc. — most anything with an Atmel AVR 8-bit processor from 8 to 16 MHz — and also works with the Arduino Due and all varieties of the PJRC Teensy boards.

Because processor-specific assembly language is used, this library does not work on Netduino, ChipKIT or other advanced “Arduino-like” boards. Others may have written code and libraries for such boards, but we can’t provide technical support for any bugs or trouble there; that’s frontier stuff. Some of this is covered in the “Advanced Coding” section.

Installation of the library is as follows:

  • Visit the Adafruit_NeoPixel library page at Github.com.
  • Select the “Download ZIP” button, or simply click this link to download directly.
  • Uncompress the ZIP file after it’s finished downloading.
  • The resulting folder should contain the files “Adafruit_NeoPixel.cpp”, “Adafruit_NeoPixel.h” and an “examples” sub-folder. Sometimes in Windows you’ll get an intermediate-level folder and need to move things around.
  • Rename the folder (containing the .cpp and .h files) to “Adafruit_NeoPixel” (with the underscore and everything), and place it alongside your other Arduino libraries, typically in your (home folder)/Documents/Arduino/Libraries folder. Libraries should not be installed alongside the Arduino application itself.
  • Re-start the Arduino IDE if it’s currently running.

Here’s a tutorial that walks through the process of correctly installing Arduino libraries.

Branchement de base

To get started, let’s assume you have some model of Arduino microcontroller connected to the computer’s USB port. We’ll elaborate on the finer points of powering NeoPixels later, but for now you should use a separate 5V DC power supply (or a 3.7V lithium-ion battery for a Flora wearable project).

Identify the “input” end of your NeoPixel strip, pixel(s) or other device. On some, there will be a solder pad labeled “DIN” or “DI” (data input). Others will have an arrow showing the direction that data moves. The data input can connect to any digital pin on the Arduino, but all the example code is set up for digital pin 6 by default. The NeoPixel shield comes wired this way.

If using Flora with an attached lithium-ion battery: connect the +5V input on the strip to the VBATT pad on Flora, GND from the strip to any GND pad on Flora, and DIN to Flora pin D6.

For other Arduino boards with a separate +5V DC power supply for the NeoPixels: connect the +5V input on the strip to the + (positive) terminal on the power supply (don’t connect to the Arduino), DIN to digital pin 6 on the Arduino, and – (minus or GND) on the strip must connect to both the minus (–) terminal on the DC supply and a GND pin on the Arduino (there are usually several — any will do).

The 144 pixel strips are so tightly packed, there’s no room for labels other than –, + and the data direction arrows. Data in/out is the un-labeled pad.

NeoPixel-UserGuide-Arduino-Brancher-01.png
Crédit: AdaFruit Industries www.adafruit.com


Source: NeoPixel UserGuide créé par Phillip Burgess pour AdaFruit Industries. Crédit AdaFruit Industries

Traduit par Meurisse D. pour MCHobby.be

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.