New to Arduino and can not get the RGB Leds to work right

Hello, I have a Arduino UNO and a layout of WS2812b strips. My layout 6 rows, 16 long; the di to do is zig zag formation. I am hoping that is a good starting point

I am trying to get text to display without having to hard code each led.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81

So what exactly is your question and do you expect anyone to understand what you put?

My crystal ball told me that is is probably helpful to check out that text scroller class for FastLED.

You should be able to adapt it to your usecase or at least find a lot of inspiration how to achieve text scrolling in general.

Sean, essentially what you are asking, I think, is how do you change row 'r', column 'c' in your 16 x 6 matrix into position 'p' in the 96 long strip, accounting for the zig-zag layout.

if ((r & 1) == 1) {
  p = 16 * r + 15 - c;
}
else {
  p = 16 * r + c;
}

Where c is between 0 and 15, r is between 0 and 5 and p is between 0 and 95.

Paul

I have downloaded and imported libraries into sketch
#include <FastLED.h>
#include <LEDMatrix.h>
#include <TextScroller.h>

I am getting an error,which makes no sense to me. When I run verify or upload the file stops compiling at the following line of TextExample1, I have not made any changes to the file.
17: cLEDMatrix<MATRIX_WIDTH, MATRIX_HEIGHT, MATRIX_TYPE> leds;

the following error cut and pasted:
Arduino: 1.0.6 (Windows 2003), Board: “Arduino Uno”
C:\Program Files\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -IC:\Program Files\Arduino\hardware\arduino\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\variants\standard -IC:\Documents and Settings\Administrator\My Documents\Arduino\libraries\FastLED-master C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build3634073109942833417.tmp\TextExample1.cpp -o C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build3634073109942833417.tmp\TextExample1.cpp.o

In file included from TextExample1.ino:1:
C:\Documents and Settings\Administrator\My Documents\Arduino\libraries\FastLED-master/FastLED.h:11:2: warning: #warning FastLED version 3.000.002 (Not really a warning, just telling you here.)
TextExample1.ino:3:23: warning: LEDMatrix.h: No such file or directory
TextExample1.ino:4:26: warning: TextScroller.h: No such file or directory
TextExample1.ino:5:25: warning: FontMatrise.h: No such file or directory
TextExample1:17: error: expected constructor, destructor, or type conversion before ‘<’ token
TextExample1:19: error: ‘cTextScroller’ does not name a type
TextExample1:24: error: ‘EFFECT_SCROLL_LEFT’ was not declared in this scope
TextExample1:24: error: expected `}’ before string constant
TextExample1:24: error: expected ‘,’ or ‘;’ before string constant
TextExample1:37: error: expected declaration before ‘}’ token

I have downloaded and imported libraries into sketch

What sketch, Sean?

I have downloaded and imported libraries into sketch

I have no idea what this sentence might mean, but the libraries need to be extracted into the library folder.

The folder FastLED-master needs to be renamed to FastLED.

After that restart the IDE and check, if you find the new examples in File/Examples.

I renamed the libraries, removing -master from each folder that had it. I am still getting errors

Here is the example TextExample1 from RGBLEDS:

#include <FastLED.h>

#include <LEDMatrix.h>
#include <TextScroller.h>
#include <FontMatrise.h>

// Change the next 6 defines to match your matrix type and size

#define LED_PIN        2
#define COLOR_ORDER    GRB
#define CHIPSET        WS2812B

#define MATRIX_WIDTH   68
#define MATRIX_HEIGHT  7
#define MATRIX_TYPE    HORIZONTAL_ZIGZAG_MATRIX

cLEDMatrix<MATRIX_WIDTH, MATRIX_HEIGHT, MATRIX_TYPE> leds;

cTextScroller ScrollingMsg;
#define MESSAGE_WIDTH   68
#define MESSAGE_HEIGHT  8
#define MESSAGE_Y       0

const unsigned char TxtDemo[] = { EFFECT_SCROLL_LEFT "            LEFT SCROLL "
                                  EFFECT_SCROLL_RIGHT "            LLORCS THGIR"
                                  EFFECT_SCROLL_DOWN "            SCROLL DOWN             SCROLL DOWN            " EFFECT_FRAME_RATE "\x04" " SCROLL DOWN            " EFFECT_FRAME_RATE "\x00" " "
                                  EFFECT_SCROLL_UP "             SCROLL UP               SCROLL UP             " EFFECT_FRAME_RATE "\x04" "  SCROLL UP             " EFFECT_FRAME_RATE "\x00" " "
                                  EFFECT_CHAR_UP EFFECT_SCROLL_LEFT "            UP"
                                  EFFECT_CHAR_RIGHT "  RIGHT"
                                  EFFECT_CHAR_DOWN "  DOWN"
                                  EFFECT_CHAR_LEFT "  LEFT"
                                  EFFECT_HSV_CV "\x00\xff\xff\x40\xff\xff" EFFECT_CHAR_UP "           HSV_CV 00-40"
                                  EFFECT_HSV_CH "\x00\xff\xff\x40\xff\xff" "    HSV_CH 00-40"
                                  EFFECT_HSV_AV "\x00\xff\xff\x40\xff\xff" "    HSV_AV 00-40"
                                  EFFECT_HSV_AH "\x00\xff\xff\xff\xff\xff" "    HSV_AH 00-FF"
                                  "           " EFFECT_HSV "\x00\xff\xff" "R" EFFECT_HSV "\x20\xff\xff" "A" EFFECT_HSV "\x40\xff\xff" "I" EFFECT_HSV "\x60\xff\xff" "N" EFFECT_HSV "\xe0\xff\xff" "B" EFFECT_HSV "\xc0\xff\xff" "O"
                                  EFFECT_HSV "\xa0\xff\xff" "W" EFFECT_HSV "\x80\xff\xff" "S " EFFECT_DELAY_FRAMES "\x00\x96" EFFECT_RGB "\xff\xff\xff" };

void setup()
{
  FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds[0], leds.Size());
  FastLED.setBrightness(255);
  FastLED.clear(true);
  delay(500);
  FastLED.showColor(CRGB::Red);
  delay(1000);
  FastLED.showColor(CRGB::Lime);
  delay(1000);
  FastLED.showColor(CRGB::Blue);
  delay(1000);
  FastLED.showColor(CRGB::White);
  delay(1000);
  FastLED.show();

  ScrollingMsg.SetFont(MATRISE_WIDTH, MATRISE_HEIGHT, MATRISE_CHAR_LOW, MATRISE_CHAR_HIGH, MatriseData);
  ScrollingMsg.Init(&leds, MESSAGE_WIDTH, MESSAGE_HEIGHT, 0, MESSAGE_Y);
  ScrollingMsg.SetText((unsigned char *)TxtDemo, sizeof(TxtDemo) - 1);
  ScrollingMsg.SetTextColrOptions(COLR_RGB | COLR_SINGLE, 0xff, 0x00, 0xff);
}


void loop()
{
  if (ScrollingMsg.UpdateText() == -1)
    ScrollingMsg.SetText((unsigned char *)TxtDemo, sizeof(TxtDemo) - 1);
  else
    FastLED.show();
  delay(10);
}

Compile Error:
Arduino: 1.0.6 (Windows 7), Board: “Arduino Uno”
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -IC:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\variants\standard -IC:\Users\Sean\Documents\Arduino\libraries\FastLED C:\Users\Sean\AppData\Local\Temp\build4009832803442818398.tmp\TextExample1.cpp -o C:\Users\Sean\AppData\Local\Temp\build4009832803442818398.tmp\TextExample1.cpp.o

In file included from TextExample1.ino:1:
C:\Users\Sean\Documents\Arduino\libraries\FastLED/FastLED.h:11:2: warning: #warning FastLED version 3.000.002 (Not really a warning, just telling you here.)
TextExample1.ino:3:23: warning: LEDMatrix.h: No such file or directory
TextExample1.ino:4:26: warning: TextScroller.h: No such file or directory
TextExample1.ino:5:25: warning: FontMatrise.h: No such file or directory
TextExample1:17: error: expected constructor, destructor, or type conversion before ‘<’ token
TextExample1:19: error: ‘cTextScroller’ does not name a type
TextExample1:24: error: ‘EFFECT_SCROLL_LEFT’ was not declared in this scope
TextExample1:24: error: expected `}’ before string constant
TextExample1:24: error: expected ‘,’ or ‘;’ before string constant
TextExample1:37: error: expected declaration before ‘}’ token

Those error messages are telling you that the libraries have not been installed in the correct place.

Hello,
still looking for a scrolling text example for ws2812 strips

I am using Arduino 1.0.6 for windows to compile

Now I am getting a error compiling from the TextExamples from the RGBLEDs library

#include "C:\Program Files (x86)\Arduino\libraries\FastLED\FastLED.h"
#include "C:\Program Files (x86)\Arduino\libraries\RGBLEDS\LEDMatrix\LEDMatrix.h"

#include <TextScroller.h>
#include <FontRobotron.h>

// Change the next 6 defines to match your matrix type and size

#define LED_PIN        2
#define COLOR_ORDER    GRB
#define CHIPSET        WS2812B

#define MATRIX_WIDTH   68
#define MATRIX_HEIGHT  7
#define MATRIX_TYPE    HORIZONTAL_ZIGZAG_MATRIX

cLEDMatrix<MATRIX_WIDTH, MATRIX_HEIGHT, MATRIX_TYPE> leds;

cTextScroller ScrollingMsg;
#define MESSAGE_WIDTH   68
#define MESSAGE_HEIGHT  8
#define MESSAGE_Y       0

const unsigned char TxtDemo[] = { EFFECT_SCROLL_LEFT "         LEFT SCROLL"
                                  EFFECT_SCROLL_RIGHT "         LLORCS THGIR"
                                  EFFECT_SCROLL_DOWN "         SCR-DOWN          SCR-DOWN         " EFFECT_FRAME_RATE "\x04" " SCR-DOWN         " EFFECT_FRAME_RATE "\x00" " "
                                  EFFECT_SCROLL_UP "         SCROL-UP          SCROL-UP         " EFFECT_FRAME_RATE "\x04" " SCROL-UP         " EFFECT_FRAME_RATE "\x00" " "
                                  EFFECT_CHAR_UP EFFECT_SCROLL_LEFT "         UP"
                                  EFFECT_CHAR_RIGHT "  RIGHT"
                                  EFFECT_CHAR_DOWN "  DOWN"
                                  EFFECT_CHAR_LEFT "  LEFT"
                                  EFFECT_HSV_CV "\x00\xff\xff\x40\xff\xff" EFFECT_CHAR_UP "   HSV_CV 00-40"
                                  EFFECT_HSV_CH "\x00\xff\xff\x40\xff\xff" "   HSV_CH 00-40"
                                  EFFECT_HSV_AV "\x00\xff\xff\x40\xff\xff" "   HSV_AV 00-40"
                                  EFFECT_HSV_AH "\x00\xff\xff\xff\xff\xff" "   HSV_AH 00-FF"
                                  "         " EFFECT_HSV "\x00\xff\xff" "R" EFFECT_HSV "\x20\xff\xff" "A" EFFECT_HSV "\x40\xff\xff" "I" EFFECT_HSV "\x60\xff\xff" "N" EFFECT_HSV "\xe0\xff\xff" "B" EFFECT_HSV "\xc0\xff\xff" "O"
                                  EFFECT_HSV "\xa0\xff\xff" "W" EFFECT_HSV "\x80\xff\xff" "S" EFFECT_DELAY_FRAMES "\x00\x96" EFFECT_RGB "\xff\xff\xff" };

void setup()
{
  FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds[0], leds.Size());
  FastLED.setBrightness(255);
  FastLED.clear(true);
  delay(500);
  FastLED.showColor(CRGB::Red);
  delay(1000);
  FastLED.showColor(CRGB::Lime);
  delay(1000);
  FastLED.showColor(CRGB::Blue);
  delay(1000);
  FastLED.showColor(CRGB::White);
  delay(1000);
  FastLED.show();

  ScrollingMsg.SetFont(ROBOTRON_WIDTH, ROBOTRON_HEIGHT, ROBOTRON_CHAR_LOW, ROBOTRON_CHAR_HIGH, RobotronData);
  ScrollingMsg.Init(&leds, MESSAGE_WIDTH, MESSAGE_HEIGHT, 0, MESSAGE_Y);
  ScrollingMsg.SetText((unsigned char *)TxtDemo, sizeof(TxtDemo) - 1);
  ScrollingMsg.SetTextColrOptions(COLR_RGB | COLR_SINGLE, 0xff, 0x00, 0xff);
}


void loop()
{
  if (ScrollingMsg.UpdateText() == -1)
    ScrollingMsg.SetText((unsigned char *)TxtDemo, sizeof(TxtDemo) - 1);
  else
    FastLED.show();
  delay(10);
}

Error:

Arduino: 1.0.6 (Windows 7), Board: “Arduino Uno”
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -IC:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\variants\standard -IC:\Users\Sean\Documents\Arduino\libraries\TextScroller C:\Users\Sean\AppData\Local\Temp\build2307610863403676873.tmp\TextExample2a.cpp -o C:\Users\Sean\AppData\Local\Temp\build2307610863403676873.tmp\TextExample2a.cpp.o

In file included from TextExample2a.ino:1:
C:\Program Files (x86)\Arduino\libraries\FastLED\FastLED.h:11:2: warning: #warning FastLED version 3.000.002 (Not really a warning, just telling you here.)
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -IC:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\variants\standard -IC:\Users\Sean\Documents\Arduino\libraries\TextScroller -IC:\Users\Sean\Documents\Arduino\libraries\TextScroller\utility C:\Users\Sean\Documents\Arduino\libraries\TextScroller\TextScroller.cpp -o C:\Users\Sean\AppData\Local\Temp\build2307610863403676873.tmp\TextScroller\TextScroller.cpp.o

C:\Users\Sean\Documents\Arduino\libraries\TextScroller\TextScroller.cpp:11:21: warning: FastLED.h: No such file or directory
C:\Users\Sean\Documents\Arduino\libraries\TextScroller\TextScroller.cpp:12:23: warning: LEDMatrix.h: No such file or directory
In file included from C:\Users\Sean\Documents\Arduino\libraries\TextScroller\TextScroller.cpp:13:
C:\Users\Sean\Documents\Arduino\libraries\TextScroller/TextScroller.h:68: error: ‘uint8_t’ has not been declared
C:\Users\Sean\Documents\Arduino\libraries\TextScroller/TextScroller.h:68: error: ‘uint8_t’ has not been declared
C:\Users\Sean\Documents\Arduino\libraries\TextScroller/TextScroller.h:68: error: ‘uint8_t’ has not been declared

Grumpy_Mike:
Those error messages are telling you that the libraries have not been installed in the correct place.

It still means that.

is hard coding the paths the way to go and am I doing it correctly?

No and no.

Please, can I get some direction from someone that has done scrolling text with strips of ws2812b. All I am getting is more confused. I have been trying different chips “74hc595, tlc5940nt”, rgb leds “4 lead rgb cathode and anode” and different configurations.

It was recommended to use the ws2812b because the leds have the ic built inside and would be easier to get what I am trying accomplish. I have used all that has been recommended.

I have been told libraries is the issues. I have copied the libraries into both my profile\Arduino\libraries and program files\Arduino\libraries. I have used the Arduino 1.0.6 to import the libraries.

what I know is this means “No such file or directory” that the library path is not working. if all the libraries are at the same level in the folder structure how are they not seeing the other libraries.

see the following:
C:\Program Files (x86)\Arduino\libraries\FastLED\FastLED.h
C:\Program Files (x86)\Arduino\libraries\RGBLEDS\LEDMatrix\LEDMatrix.h

how can this say no such directory?
TextScroller.cpp:11:21: warning: FastLED.h: No such file or directory

so, I open the TextScroller.cpp and the paths
#include <FastLED.h>
#include <LEDMatrix.h>
#include <TextScroller.h>

in the C:\Program Files (x86)\Arduino\libraries
I have the following all at the same level
C:\Program Files (x86)\Arduino\libraries\Arduino
C:\Program Files (x86)\Arduino\libraries\FastLED
C:\Program Files (x86)\Arduino\libraries\LEDMatrix
C:\Program Files (x86)\Arduino\libraries\RGBLEDS
C:\Program Files (x86)\Arduino\libraries\SmartMatrix
C:\Program Files (x86)\Arduino\libraries\TextScroller

I am moving my question to programming section. That seems to be a more suitable location for my resent issue.

Moving this into the programming section is unlikely to help you.
the libraries you have listed need to go into to your private library folder ONLY. If you’ve placed them as we’ll into:
C:\Program Files (x86)\Arduino\libraries
You need to remove them from there. It may not be your problem now but will cause you problems later.
If it comes to libraries the Arduino IDE is not particularly intelligent.

Also, i am not sure why you are mucking around with .cpp files.
The #include <placeyurlibraryhere.h>
need to go to the beginning of your sketch. Sketches in the Arduino.ide have the file ending .ino and ar not “regular” .cpp files.

Thanks, that is what I finnally learned from the programming section. I uninstalled and reinstalled Arduino 1.0.6, now the examples are working.