Anyone have experience getting this to work with neopixels and the neopixel library?
On my Flora, I have the neopixel powered from the vbatt and signal coming out of D6 pin, and this code works fine:
#include <Adafruit_NeoPixel.h>
int PIXEL_COUNT = 1;
int dPin = 6;
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, dPin, NEO_GRB + NEO_KHZ800);
uint32_t baseColour;
uint32_t otherColour;
int swap = false;
void setup()
{
strip.begin();
baseColour = strip.Color(100, 0, 000);
otherColour = strip.Color(0, 100, 0);
}
void loop()
{
if (swap)
{
strip.setPixelColor(0, baseColour);
}
else
{
strip.setPixelColor(0, otherColour);
}
strip.show();
swap = !swap;
delay(1000);
}
When I hook up my Lilypad MP3, also powering from its vbatt and signal line to TRIG1, and running the same code (but changed dPin = 23 to match), the pixel doesn’t light up. I know it’s the right pin because I’ve run a simple blink test on it and a simple LED blinks.
What I noticed is different is:
On Flora,
-
Voltage across the neopixel power terminals is about 3.9
-
Voltage across the signal to ground is around 0.
On Lilypad MP3,
-
Voltage across the neopixel power terminals is about 4.1
-
Voltage across the signal to ground is constantly about 3. !!! This has to be wrong?
But what does this mean and how do I fix it?
I am using the same 3.7V 1300mAh Lion battery to power both.
I want to run a neopixel strip from the Lilypad MP3 and it works from the Flora, but for this test I used a Flora neopixel v2.
Here’s the datasheet for the Lilypad MP3
http://dlnmh9ip6v2uc.cloudfront.net/dat … 3-v15a.pdf
Thank you in advance for any help! XD
Ok so I noticed 2 more things different.
When I digitalWrite(pin, LOW) on lilypad trig1 the pin goes to about 2.4V and when I digitalWrite(pin, HIGH) the pin goes to 0. On the Flora, it’s the opposite, and the pin voltage is higher too, about 3.4V.
I guess that explains why it doesn’t work. Um, so now what? Thanks.