Adafruit NeoPixel Library
Classes | Macros | Typedefs
Adafruit_NeoPixel.h File Reference

Go to the source code of this file.

Classes

class  Adafruit_NeoPixel
 Class that stores state and functions for interacting with Adafruit NeoPixels and compatible devices. More...
 

Macros

#define NEO_RGB   ((0 << 6) | (0 << 4) | (1 << 2) | (2))
 Transmit as R,G,B.
 
#define NEO_RBG   ((0 << 6) | (0 << 4) | (2 << 2) | (1))
 Transmit as R,B,G.
 
#define NEO_GRB   ((1 << 6) | (1 << 4) | (0 << 2) | (2))
 Transmit as G,R,B.
 
#define NEO_GBR   ((2 << 6) | (2 << 4) | (0 << 2) | (1))
 Transmit as G,B,R.
 
#define NEO_BRG   ((1 << 6) | (1 << 4) | (2 << 2) | (0))
 Transmit as B,R,G.
 
#define NEO_BGR   ((2 << 6) | (2 << 4) | (1 << 2) | (0))
 Transmit as B,G,R.
 
#define NEO_WRGB   ((0 << 6) | (1 << 4) | (2 << 2) | (3))
 Transmit as W,R,G,B.
 
#define NEO_WRBG   ((0 << 6) | (1 << 4) | (3 << 2) | (2))
 Transmit as W,R,B,G.
 
#define NEO_WGRB   ((0 << 6) | (2 << 4) | (1 << 2) | (3))
 Transmit as W,G,R,B.
 
#define NEO_WGBR   ((0 << 6) | (3 << 4) | (1 << 2) | (2))
 Transmit as W,G,B,R.
 
#define NEO_WBRG   ((0 << 6) | (2 << 4) | (3 << 2) | (1))
 Transmit as W,B,R,G.
 
#define NEO_WBGR   ((0 << 6) | (3 << 4) | (2 << 2) | (1))
 Transmit as W,B,G,R.
 
#define NEO_RWGB   ((1 << 6) | (0 << 4) | (2 << 2) | (3))
 Transmit as R,W,G,B.
 
#define NEO_RWBG   ((1 << 6) | (0 << 4) | (3 << 2) | (2))
 Transmit as R,W,B,G.
 
#define NEO_RGWB   ((2 << 6) | (0 << 4) | (1 << 2) | (3))
 Transmit as R,G,W,B.
 
#define NEO_RGBW   ((3 << 6) | (0 << 4) | (1 << 2) | (2))
 Transmit as R,G,B,W.
 
#define NEO_RBWG   ((2 << 6) | (0 << 4) | (3 << 2) | (1))
 Transmit as R,B,W,G.
 
#define NEO_RBGW   ((3 << 6) | (0 << 4) | (2 << 2) | (1))
 Transmit as R,B,G,W.
 
#define NEO_GWRB   ((1 << 6) | (2 << 4) | (0 << 2) | (3))
 Transmit as G,W,R,B.
 
#define NEO_GWBR   ((1 << 6) | (3 << 4) | (0 << 2) | (2))
 Transmit as G,W,B,R.
 
#define NEO_GRWB   ((2 << 6) | (1 << 4) | (0 << 2) | (3))
 Transmit as G,R,W,B.
 
#define NEO_GRBW   ((3 << 6) | (1 << 4) | (0 << 2) | (2))
 Transmit as G,R,B,W.
 
#define NEO_GBWR   ((2 << 6) | (3 << 4) | (0 << 2) | (1))
 Transmit as G,B,W,R.
 
#define NEO_GBRW   ((3 << 6) | (2 << 4) | (0 << 2) | (1))
 Transmit as G,B,R,W.
 
#define NEO_BWRG   ((1 << 6) | (2 << 4) | (3 << 2) | (0))
 Transmit as B,W,R,G.
 
#define NEO_BWGR   ((1 << 6) | (3 << 4) | (2 << 2) | (0))
 Transmit as B,W,G,R.
 
#define NEO_BRWG   ((2 << 6) | (1 << 4) | (3 << 2) | (0))
 Transmit as B,R,W,G.
 
#define NEO_BRGW   ((3 << 6) | (1 << 4) | (2 << 2) | (0))
 Transmit as B,R,G,W.
 
#define NEO_BGWR   ((2 << 6) | (3 << 4) | (1 << 2) | (0))
 Transmit as B,G,W,R.
 
#define NEO_BGRW   ((3 << 6) | (2 << 4) | (1 << 2) | (0))
 Transmit as B,G,R,W.
 
#define NEO_KHZ800   0x0000
 800 KHz data transmission
 
#define NEO_KHZ400   0x0100
 400 KHz data transmission
 

Typedefs

typedef uint16_t neoPixelType
 3rd arg to Adafruit_NeoPixel constructor
 

Detailed Description

This is part of Adafruit's NeoPixel library for the Arduino platform, allowing a broad range of microcontroller boards (most AVR boards, many ARM devices, ESP8266 and ESP32, among others) to control Adafruit NeoPixels, FLORA RGB Smart Pixels and compatible devices – WS2811, WS2812, WS2812B, SK6812, etc.

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Written by Phil "Paint Your Dragon" Burgess for Adafruit Industries, with contributions by PJRC, Michael Miller and other members of the open source community.

This file is part of the Adafruit_NeoPixel library.

Adafruit_NeoPixel is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Adafruit_NeoPixel is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with NeoPixel. If not, see http://www.gnu.org/licenses/.