0

Help Coding NeoPixel Mini 3535
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Help Coding NeoPixel Mini 3535

by thesmallwonder on Tue Jan 02, 2018 6:24 pm

I was trying to do a standard strand test using the example code from the NeoPixel library with a single NeoPixel Mini 3535 and a Gemma. When I run it on my Flora Pixel it works as expected.

I have a 470 OHM resistor on the data in and am using the 3V out since I'm currently out of capacitors. I read that the Mini3535 should be Neo Pixel library compatible, is the missing capacitor really causing the problem? Is there something else I have to do for the code? The Mini 3535 is getting power and is green when I connect ground and power, it goes to a dimmer green when I connect the data but does not run it through the various light cycles.

thesmallwonder
 
Posts: 5
Joined: Tue Jan 02, 2018 5:46 pm

Re: Help Coding NeoPixel Mini 3535

by thesmallwonder on Thu Jan 04, 2018 10:11 pm

Anyone...?

thesmallwonder
 
Posts: 5
Joined: Tue Jan 02, 2018 5:46 pm

Re: Help Coding NeoPixel Mini 3535

by adafruit_support_bill on Fri Jan 05, 2018 3:53 pm

Powering it from 3.3v is a bit iffy. They are designed for 5v, and we've run them reliably as low as 3.7v. Not sure how well they perform below that level.

If your connections are short (less than a foot or two) you can try eliminating the resistor on the signal line.

adafruit_support_bill
 
Posts: 64178
Joined: Sat Feb 07, 2009 10:11 am

Re: Help Coding NeoPixel Mini 3535

by chemdoc77 on Fri Jan 05, 2018 4:08 pm

Did you change the

Code: Select all | TOGGLE FULL SIZE
 #define PIN 6

in the strandtest.ino to another number since the Gemma Pin numbers do not go that high? I make the same mistake using sketches from a Metro Mini on a Trinket.

chemdoc77
 
Posts: 92
Joined: Mon Jan 28, 2013 9:32 am

Re: Help Coding NeoPixel Mini 3535

by franklin97355 on Fri Jan 05, 2018 4:12 pm

What are you using for power to the Gemma and the pixel?

franklin97355
 
Posts: 17312
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Help Coding NeoPixel Mini 3535

by adafruit_support_bill on Fri Jan 05, 2018 4:19 pm

Yes. Change the pin number to match the number on the Gemma pin you are connected to.

adafruit_support_bill
 
Posts: 64178
Joined: Sat Feb 07, 2009 10:11 am

Re: Help Coding NeoPixel Mini 3535

by thesmallwonder on Fri Jan 05, 2018 4:29 pm

Hi everyone,

Thank you for the replies!

- Pin was changed to 1 already before I ran the first test, and it's also how I got the Flora Sewable Pixel to work using my Gemma to test that the strand test code was outputting as expected.

- Gemma is being powered by the laptop USB, the normal power out on the Gemma provides 4.6V according to my volt meter.

- I tried hooking up the 3535 to the normal (outputting 4.6V) power and it lit brightly but did not burn out. With only ground and power connected it glowed a consistent bright green. However, it still dimmed and vaguely flickered green when the data was connected as opposed to cycling through the colors like the Flora Pixel did. I also tried bypassing the resistor on the data since I only have short leads, but it did not change anything.

Any other ideas for what might be going on?

thesmallwonder
 
Posts: 5
Joined: Tue Jan 02, 2018 5:46 pm

Re: Help Coding NeoPixel Mini 3535

by adafruit_support_bill on Fri Jan 05, 2018 5:20 pm

Please post photos showing your soldering and connections.

adafruit_support_bill
 
Posts: 64178
Joined: Sat Feb 07, 2009 10:11 am

Re: Help Coding NeoPixel Mini 3535

by thesmallwonder on Fri Jan 05, 2018 6:01 pm

Hi there,

Here's a gallery of my testing with pictures of connections:
https://imgur.com/gallery/b6L7c

Code Used (I switched to a simple test as opposed to strand and gained the same results):

// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif

// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1
#define PIN 1

// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 1

// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.
// Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest
// example for more information on possible values.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

int delayval = 500; // delay for half a second

void setup() {
// This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket
#if defined (__AVR_ATtiny85__)
if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif
// End of trinket special code

pixels.begin(); // This initializes the NeoPixel library.
}

void loop() {

// For a set of NeoPixels the first NeoPixel is 0, second is 1, all the way up to the count of pixels minus one.

for(int i=0;i<NUMPIXELS;i++){

// pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
pixels.setPixelColor(i, pixels.Color(0,75,255));

pixels.show(); // This sends the updated pixel color to the hardware.

delay(delayval); // Delay for a period of time (in milliseconds).

}
}

thesmallwonder
 
Posts: 5
Joined: Tue Jan 02, 2018 5:46 pm

Re: Help Coding NeoPixel Mini 3535

by thesmallwonder on Fri Jan 05, 2018 6:39 pm

Heads up, I just soldered a new one as well to see if it was my soldering causing issues and the same thing is occurring with the newly soldered 3535.

thesmallwonder
 
Posts: 5
Joined: Tue Jan 02, 2018 5:46 pm

Re: Help Coding NeoPixel Mini 3535

by adafruit_support_bill on Sat Jan 06, 2018 9:15 am

It looks like you are powering the Gemma via USB and the pixels from the VOUT pin. That means your pixels are at 5v. When running pixels at 5v and using a 3.3v processor, level shifting is typically required as described in the guide here:

https://learn.adafruit.com/adafruit-neo ... -practices
NeoPixels powered by 5v require a 5V data signal. If using a 3.3V microcontroller you must use a logic level shifter such as a 74AHCT125 or 74HCT245. (If you are powering your NeoPixels with 3.7v like from a LiPoly, a 3.3v data signal is OK)

adafruit_support_bill
 
Posts: 64178
Joined: Sat Feb 07, 2009 10:11 am

Re: Help Coding NeoPixel Mini 3535

by chemdoc77 on Sat Jan 06, 2018 9:16 am

Hi thesmallwonder:

From your pictures it looks like you are using a Flora NeoPixel. If so, is it V1 or V2? Look on the back to find out.

Next run the following code:

Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_NeoPixel.h>

#define PIN 1

// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
}

void loop() {

 strip.setPixelColor(0, strip.Color(150, 0, 0));  //Red
      strip.show();
      delay(500);

strip.setPixelColor(0, strip.Color(0, 0, 0));  //Black
      strip.show();
      delay(500);

strip.setPixelColor(0, strip.Color(0, 150, 0));  //Green
      strip.show();
      delay(500);

strip.setPixelColor(0, strip.Color(0, 0, 0));  //Black
      strip.show();
      delay(500);

strip.setPixelColor(0, strip.Color(0, 0, 150)); //Blue
      strip.show();
      delay(500);

strip.setPixelColor(0, strip.Color(0, 0, 0));   //Black
      strip.show();
      delay(500);


Does it flash the NeoPixel on and off? Are the colors – Red, Green and Blue?

chemdoc77
 
Posts: 92
Joined: Mon Jan 28, 2013 9:32 am

Please be positive and constructive with your questions and comments.


cron