Arduino libraries
A library is ready-made code for a part, written and shared by someone else. It does the hard work, like sending the 24 bits per LED of an LED strip, so your program stays short.
Install it once, include it at the top, make an object, call its functions.
More: the four steps
- Install: in the Arduino IDE, Tools, Manage Libraries; search the name, click Install.
- Include: the first line of the sketch brings it in:
#include <Adafruit_NeoPixel.h> - Make an object: one for each part:
Adafruit_NeoPixel strip(10, 6, NEO_GRB + NEO_KHZ800); - Call its functions on the object:
strip.begin();strip.show();
Every library comes with examples: File, Examples, then the library's name. Opening one is the fastest way to see what its functions do.