Zakładka z wyszukiwarką danych komponentów
  Polish  ▼
ALLDATASHEET.PL

X  

WS2812 Arkusz danych(PDF) 55 Page - Raspberry Pi Holdings PLC

Numer części WS2812
Szczegółowy opis  Created by Phillip Burgess
PDF  98 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Producent  RASPBERRY-PI [Raspberry Pi Holdings PLC]
Strona internetowa  https://www.raspberrypi.com/
Logo RASPBERRY-PI - Raspberry Pi Holdings PLC

WS2812 Arkusz danych(HTML) 55 Page - Raspberry Pi Holdings PLC

Back Button WS2812 Datasheet HTML 51Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 52Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 53Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 54Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 55Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 56Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 57Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 58Page - Raspberry Pi Holdings PLC WS2812 Datasheet HTML 59Page - Raspberry Pi Holdings PLC Next Button
Zoom Inzoom in Zoom Outzoom out
 55 / 98 page
background image
Arduino Library
Use
Doxygen-generated documentation for the Adafruit_NeoPixel library is available here. (https://adafru.it/Etk)
It’s assumed at this point that you have the Adafruit_NeoPixel library for Arduino installed and have run the
strandtest example sketch successfully. If not, return to the prior page for directions to set that up.
To learn about writing your own NeoPixel sketches, let’s begin by dissecting the strandtest sketch…
All NeoPixel sketches begin by including the header file:
#include <Adafruit_NeoPixel.h>
The block of code that follows is mostly descriptive comments. Only a couple lines are really doing any work:
// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1:
#define LED_PIN
6
// How many NeoPixels are attached to the Arduino?
#define LED_COUNT 60
// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
// Argument 1 = Number of pixels in NeoPixel strip
// Argument 2 = Arduino pin number (most are valid)
// Argument 3 = Pixel type flags, add together as needed:
//
NEO_KHZ800
800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//
NEO_KHZ400
400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//
NEO_GRB
Pixels are wired for GRB bitstream (most NeoPixel products)
//
NEO_RGB
Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
//
NEO_RGBW
Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
The first few lines assign numbers to the symbols “LED_PIN” and “LED_COUNT” for later reference. It doesn’t
need to
be done this way, but makes it easier to change the pin and length where the NeoPixels are connected without
digging deeper into the code.
The last line declares a NeoPixel
object. We’ll refer to this by name later to control the strip of pixels. There are three
parameters or
arguments in parenthesis:
1. The number of sequential NeoPixels in the strip. In the example this is set to LED_COUNT, which was defined as
60 above, equal to 1 meter of medium-density strip. Change this to match the actual number you’re using.
2. The pin number to which the NeoPixel strip (or other device) is connected. Normally this would be a number, but
we previously declared the symbol LED_PIN to refer to it by name here.
3. A value indicating the type of NeoPixels that are connected. In most cases you can leave this off and pass just
two arguments; the example code is just being extra descriptive. If you have a supply of classic “V1” Flora pixels,
those require NEO_KHZ400 + NEO_RGB to be passed here. RGBW NeoPixels also require a different value here:
NEO_RGBW.
For through-hole 8mm NeoPixels, use NEO_RGB instead of NEO_GRB in the strip declaration. For RGBW
© Adafruit Industries
https://learn.adafruit.com/adafruit-neopixel-uberguide
Page 58 of 101



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98


Arkusz danych Pobierz

Go To PDF Page


Link URL



Czy Alldatasheet okazała się pomocna?  [ DONATE ] 

O Alldatasheet   |   Reklama   |   Kontakt   |   Polityka prywatności   |   Link do karty katalogowej    |   Linki   |   Lista producentów
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com