Problems using Led strips with Lilypad

Hello everyone,

I built a led matrix using WS2812B Rgb strips, a simple 15x10 design, externally powered.
I'd like to control them using an arduino lilypad (not authentic).

I wrote a code to make a "2" appear on the matrix, and it works perfectly if used with an arduino uno.

However when i try to use the same code with the lilypad (changing of course the setting in the ide from arduino uno to lilypad), it doesn't work.
The matrix light up but it shows what seems to be a random pattern, changing over time.

The lilypad itself seems to work nicely with other programs that don't use the matrix but just a couple of leds.

I used the FastLED 3.4.0 library `.

Do you have any tips on what could be the problem?
Thanks in advance to everyone.

Carlo

#include <avr/pgmspace.h>  // Needed to store stuff in Flash using PROGMEM
#include <FastLED.h>       // Fastled library to control the LEDs

// How many leds are connected?
#define NUM_LEDS 150

// Define the Data Pin
#define DATA_PIN 3  // Connected to the data pin of the first LED strip

// Define the array of leds
CRGB leds[NUM_LEDS];

// Create the array of retro arcade characters and store it in Flash memory
const long TWO[] PROGMEM =
{
                     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
                   0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
                   0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FF00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FF00, 0x0000FF00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
                   0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FF00, 0x0000FF00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
                   0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FF00, 0x0000FF00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
                   0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FF00, 0x0000FF00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
                   0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FF00, 0x0000FF00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
                   0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FF00, 0x0000FF00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
                   0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
                   0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
};

void setup() { 
FastLED.addLeds<NEOPIXEL,DATA_PIN>(leds, NUM_LEDS);  // Init of the Fastled library
FastLED.setBrightness(50);
FastLED.clear();
}

void loop() 
{ 
    for(int i = 0; i < NUM_LEDS; i++) 
      {
        leds[i] = pgm_read_dword(&(TWO[i]));  // Read array from Flash
      }

    FastLED.show();
    delay(500);

  }

Is the Lilypad a 3.3V device?

If so, see here. Or search for "ws2812 with 3.3v" for more pages.

At the moment i'm using the lilypad through an arduino uno without the atmega, just connecting lilypad's pins at gnd, 5v, rx, tx, reset of the uno.

The matrix is externally powered at 5 volt.

Is the data in signal to the WS2812 5V or 3.3V?

I'm not sure as i don't have a voltmeter now and i'm pretty new to this stuff.
I think it's actually at 3,3V.
Should I try to raise it up to 5 volte in order to work properly with the strip?
I didn't understand from the pages that you linked to me how actually could I do something like this.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.