Adafruit_NeoPixel Library Documentation

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
edtalmadge
 
Posts: 25
Joined: Sat Oct 26, 2013 11:10 pm

Adafruit_NeoPixel Library Documentation

Post by edtalmadge »

I'm new to Arduino and C++.
I have experience programming in other languages like JavaScript, PHP, Node and C+.

I've got the Adafruit_Neopixel library working on an Arduino & lightsript with the example sketch:
https://github.com/adafruit/Adafruit_Ne ... ndtest.pde

So far I've ready this guide:
http://learn.adafruit.com/adafruit-neop ... no-library

... And glanced at the source code:
https://github.com/adafruit/Adafruit_Ne ... oPixel.cpp

My goal is to use the Adafruit_NeoPixel library to make an animated light strip display.
But, not knowing C++ is making it hard for me to figure out what functions are available in the Adafruit NeoPixel library.

For example, I found these functions in "strandtest.pde":
delay
color

But, I'm curious to see what other functions are available.
Is there any API documentation or more info?

User avatar
adafruit_support_bill
 
Posts: 88092
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit_NeoPixel Library Documentation

Post by adafruit_support_bill »

Look at Adafruit_NeoPixel.h. https://github.com/adafruit/Adafruit_Ne ... NeoPixel.h

Everything defined as "public" is available for use:

Code: Select all

public:

  // Constructor: number of LEDs, pin number, LED type
  Adafruit_NeoPixel(uint16_t n, uint8_t p=6, uint8_t t=NEO_GRB + NEO_KHZ800);
  ~Adafruit_NeoPixel();

  void
    begin(void),
    show(void),
    setPin(uint8_t p),
    setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b),
    setPixelColor(uint16_t n, uint32_t c),
    setBrightness(uint8_t);
  uint8_t
   *getPixels() const;
  uint16_t
    numPixels(void) const;
  static uint32_t
    Color(uint8_t r, uint8_t g, uint8_t b);
  uint32_t
    getPixelColor(uint16_t n) const;

edtalmadge
 
Posts: 25
Joined: Sat Oct 26, 2013 11:10 pm

Re: Adafruit_NeoPixel Library Documentation

Post by edtalmadge »

Great, thanks!

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”