Jump to content

This is a string of WS2811 with a Sunfounder UNO(seen here http: goo gl tpsyvK) It should be cod...


G+_Tim Karre
 Share

Recommended Posts

The code

 

 

 

#include "FastLED.h"

#define NUM_LEDS 25

#define DATA_PIN 7

CRGB leds[NUM_LEDS];

 

void setup()

{

FastLED.addLeds(leds, NUM_LEDS);

}

 

 

void loop()

{

FastLED.clear();

leds[0] = 0x14fb4f;

leds[1] = 0x002244;

leds[2] = 0xFB4F14;

leds[3] = 0x002244;

leds[4] = 0xFB4F14;

leds[5] = 0x002244;

leds[6] = 0xFB4F14;

leds[7] = 0x002244;

leds[8] = 0xFB4F14;

leds[9] = 0x002244;

leds[10] = 0xFB4F14;

leds[11] = 0x002244;

leds[12] = 0xFB4F14;

leds[13] = 0x002244;

leds[14] = 0xFB4F14;

leds[15] = 0x002244;

leds[16] = 0xFB4F14;

leds[17] = 0x002244;

leds[18] = 0xFB4F14;

leds[19] = 0x002244;

leds[20] = 0xFB4F14;

leds[21] = 0x002244;

leds[22] = 0xFB4F14;

leds[23] = 0x002244;

leds[24] = 0xFB4F14;

FastLED.setBrightness(60);

FastLED.show();

delay(200);

 

FastLED.clear();

leds[0] = 0x002244;

leds[1] = 0xFB4F14;

leds[2] = 0x002244;

leds[3] = 0xFB4F14;

leds[4] = 0x002244;

leds[5] = 0xFB4F14;

leds[6] = 0x002244;

leds[7] = 0xFB4F14;

leds[8] = 0x002244;

leds[9] = 0xFB4F14;

leds[10] = 0x002244;

leds[11] = 0xFB4F14;

leds[12] = 0x002244;

leds[13] = 0xFB4F14;

leds[14] = 0x002244;

leds[15] = 0xFB4F14;

leds[16] = 0x002244;

leds[17] = 0xFB4F14;

leds[18] = 0x002244;

leds[19] = 0xFB4F14;

leds[20] = 0x002244;

leds[21] = 0xFB4F14;

leds[22] = 0x002244;

leds[23] = 0xFB4F14;

leds[24] = 0xFB4F14;

FastLED.setBrightness(60);

FastLED.show();

delay(200);

 

}

Link to comment
Share on other sites

FB4F14

002244

 

I don't have any experience with any of these (yet), but it looks like for each light you have 3 octets: red, green, and blue. I don't know how familiar you are with what that each of those hex strings represents, so let us know if you want a better explanation. Basically you're two codes there (002244 & FB4F14) represent the red (00), green (22), and blue (44) values.

 

If for some reason your strip of light is GRB instead of RGB, the first two octets would need to be swapped. To test this, you could make a simple sketch that sets the first light to red (0xFF0000) the second to green (0x00FF00) and the third to blue (0x0000FF). If the red and green are out of place, you know your series is different.

 

Hope this helps.

Link to comment
Share on other sites

 Share

×
×
  • Create New...