Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glediator example problem #18

Open
olablt opened this issue May 24, 2017 · 2 comments
Open

Glediator example problem #18

olablt opened this issue May 24, 2017 · 2 comments

Comments

@olablt
Copy link

olablt commented May 24, 2017

Hello,

I am using Glediator example code and the LEDs on even lines are shifted by 2 pixels:

image

The text should be "olab.lt"

There is no problem when I use this code:

#include "FastLED.h"
#define NUM_LEDS 60*18
const int dataline = 2;

CRGB leds[NUM_LEDS];
void setup() {
        Serial.begin(115200); 
     LEDS.addLeds<WS2812B, dataline>(leds, NUM_LEDS);
}
int serialGlediator() {
  while (!Serial.available()) {}
  return Serial.read();
}
void loop() {
   while (serialGlediator() != 1) {} 

   for (int i=0; i < NUM_LEDS; i++) {
     leds[i].r = serialGlediator();
     leds[i].g = serialGlediator();
     leds[i].b = serialGlediator();
   }
     FastSPI_LED.show();
}

But this is working only for leds on data pin 2. I have 2 panels on 2 pins - 2 and 14.

How can I resolve this issue?

@PaulStoffregen
Copy link
Owner

Of course it only uses pin 2. You're not using OctoWS2811 in any way in this code!

@olablt
Copy link
Author

olablt commented Jun 3, 2017

Hey Paul. Maybe my question is not clear enough. I am using 2 code samples. One using OctoWS2811 and other using FastLED library. The one with OctoWS2811 is shifting pixels. And the one with FastLED is working good.

I updated FastLED to use pins 2 and 14 and everything is good now. But no success with OctoWS2811.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants