Library to control NeoPixel strings of RGB leds

Dependencies:   PixelArray

Dependents:   NeoPixelI2cSlave NeoPixelI2cSlave

Committer:
dwini
Date:
Sun Oct 25 11:24:54 2015 +0000
Revision:
0:66a5d46a740f
Start of NeoPixelString library.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dwini 0:66a5d46a740f 1 #include "neopixel_string_factory.h"
dwini 0:66a5d46a740f 2
dwini 0:66a5d46a740f 3 NeoPixelString * NeoPixelStringFactory::createNeoPixelString(PinName spi_pin, unsigned int length) {
dwini 0:66a5d46a740f 4 // Create a temporary DigitalIn so we can configure the pull-down resistor.
dwini 0:66a5d46a740f 5 // (The mbed API doesn't provide any other way to do this.)
dwini 0:66a5d46a740f 6 // An alternative is to connect an external pull-down resistor.
dwini 0:66a5d46a740f 7 DigitalIn(spi_pin, PullDown);
dwini 0:66a5d46a740f 8
dwini 0:66a5d46a740f 9 return new NeoPixelString(spi_pin, length);
dwini 0:66a5d46a740f 10 }