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.
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.
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
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
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
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
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.