Glediator with 5×8 RGB LED WS2812B Arduino NeoPixel shield
|
Maybe you are already familiar with the WS2812B RGB LEDs, also known as ‘NeoPixels’. There are shields available for Arduino which have 40 of those individually addressable LEDs in a 5×8 matrix. Shields like the CJMCU 40 Bit 5 x 8 WS2812B 5050 RGB LED Driver Development Board are readily available from suppliers like VNG Systems.
It’s easy to control the Arduino Neopixel shields from a sketch. You can also use Solderlab’s Glediator software (files are available below when Solderlab.de is down) to make your own light show. Glediator (short for ‘Graphical LED Installation AnimaTOR‘) is software to control led matrix and led stripe installations. This led matrix control application is written in Java and thus platform independent. You can run it on both Linux and Windows.


Installing and testing the Arduino NeoPixel shield
- Make sure you power the shield with an external 4-6VDC power supply wired to the shield’s terminal block. See the instructions that came with the Arduino NeoPixel shield on how to do that.
- Attach the shield to your Arduino and hook the Arduino up to your computer.
- Start the Arduino IDE and install the Adafruit NeoPixel library:
– Go to Sketch > Include library > Manage libraries
– Search for ‘NeoPixel’, then select and install the Adafruit NeoPixel library - Load the sample sketch to see if your Neopixel shield is working.
– Go to File > Examples > Adafruit Neopixel and load the ‘simple’ sketch
– Find the line#define NUMPIXELS 16
and change it to
#define NUMPIXELS 40
When you upload the sketch to your Arduino, all of the 40 LEDs on the NeoPixel shield should light up green.
Uploading the Glediator sketch to the Arduino
If you want to control your Arduino NeoPixel shield with the Glediator software, you will first need to put the Glediator ‘client’ sketch on your Arduino. It’s a small sketch to receive data from Glediator and push it to the WS2812B pixels.
- Go to this Solderlab downloads page for the ‘WS2812-Glediator-Interface’ sketch and download the file ‘ws2812_glediator.zip’, or use this mirrored file when Solderlab.de is down:
- Unzip the file, open the sketch ‘WS2812_Glediator.ino’ in the Arduino IDE and upload it to your Arduino


Linux Mint/Ubuntu/Debian: installing the RXTX Java library
To be able to use Glediator’s serial output you will have to install the RXTX library on your system. First, open a terminal window and download librxtx:
apt-get update
apt-get install librxtx-java
Next, you need to copy two downloaded files librxtxSerial.so and librxtxParallel.so from the folder /usr/lib/jni/ to the libraries folder of your current Java installation:
On my main system with Java JRE 1.8.0_111 installed, the folder was located at /opt/java/jdk1.8.0_111/jre/lib/amd64/ so I copied the files using:
sudo cp /usr/lib/jni/librxtxSerial.so /opt/java/jdk1.8.0_111/jre/lib/amd64/
sudo cp /usr/lib/jni/librxtxParallel.so /opt/java/jdk1.8.0_111/jre/lib/amd64/
On another system running Linux Mint with OpenJDK 1.7.0 the libraries folder was located at /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64. If you have trouble finding your libraries folder, try searching for an already installed default library like libawt.so:
locate libawt.so
If this results in multiple locations because you have installed Java more than once, find the current version of Java you are using:
java -version
Or else you might find some clues using:
java -XshowSettings:properties
Linux Mint/Ubuntu/Debian: installing and running Glediator
- Go to the Glediator downloads page and download the current version, or use this mirrored file when Solderlab.de is down:
- Extract the downloaded archive.
- Then open a terminal window.
- Navigate to the dist folder and run the .jar file like this:
java -jar Glediator_V2.jar


Windows: installing the RXTX Java library
- Make sure you have Java installed, or get it at https://www.java.com
- Go to the RXTX download page and download the latest stable release (binary) from the ‘Pre-Built Binaries’ section (I downloaded the file rxtx-2.1-7-bins-r2.zip).
- Find your Java folder, mine was located at C:\Program Files (x86)\Java\jre1.8.0_121
- Copy rxtxParallel.dll to C:\Program Files (x86)\Java\jre1.8.0_121\bin\
- Copy rxtxSerial.dll to C:\Program Files (x86)\Java\jre1.8.0_121\bin\
- Copy RXTXcomm.jar to C:\Program Files (x86)\Java\jre1.8.0_121\lib\ext\
- Reboot.
Windows: installing and running Glediator
- Go to the Glediator downloads page and download the current version, or use this mirrored file when Solderlab.de is down:
- Extract the downloaded archive.
- Navigate to the dist folder.
- Double click the .jar file Glediator_V2.jar.
Glediator settings for the NeoPixel shield
In menu Options > Matrix Size change the settings to:
- Size_X: 8
- Size_Y: 5
- Space: 1
In menu Options > Output change the settings to:
- Output mode: Glediator_Protocol
- Mapping Mode: Single_Pixels
- Pixel Order: HL_TL
- Color Order: GRB
- Com Port: for example /dev/ttyUSB0 (Linux) or COM3 (Windows)
- Baud Rate: B_1000000


Then click Serial Open and your Arduino NeoPixel shield should come alive!


Greetings!
I would like to use 10 strips of Led with 30 Leds each, ie a 10×30 Matrix to make a scrolling text; It’s possible?
Thank you
Yes, you can do that with Glediator. I tried something similar with just 3 strips of 1 meter and 30 LEDs each. If I remember correctly, I did it like this:
Connect all the strips together in a zig zag (snake) like pattern (so they alternate between going left and right). Use a 5V power source that is able to provide sufficient current, for instance an old computer power suppy. Do not power it from your Arduino directly, it will destroy your board.
Connect the data pin of the LED strip to pin 6 of your Arduino (note that the data works in one direction only, see the arrows on your strip). Connect the ground of your power supply to both your Arduino and the strip so that everything shares the same ground connection. Connect the 5V to your strip last.
It is best to feed the power to your strip not just from one end of the strip, it’s better to feed it between the two center strips or both ends, or even multiple points. If the power isn’t ‘spread’ evenly over the strip, the LEDs furthest from a power connection will not work correctly (incorrect colors, usually).
In glediator you should set the correct X and Y sizes. Mapping mode should be ‘single pixels’ and pixel order probably one of the settings starting with “HS_” like “HS_TR” or “HS_BL”.
I think that’s about it, I will try to write a blog post about it some time soon. Good luck with your project, I hope you will succeed. Let me know how it went! 🙂
nice howto. Thanks. However, I’ve got only
Options: Wrong number_of_boards size.
on my java console and nothing happens. Do you have any idea what I can do to use glediator with my arduino and the shield?
Hi
Tnx for the write up, I have managed to connect one 8×8, 2812 matrix, to my UNO, and controlling it from the Glediator.
I only manage to turn on/ off the matrix, no matter what changes i do in glediator, te matrix dont change pattern.
So I`m quite stucked for the moment.
Has to be said, its the 1st time i`m using Uno and glediator though….
Cheers.
John
Hi,
Thank you for a nice tutorial, I implemented the same with a 5×8 matrix initially i was getting the sequence when I selected the Baud rate of B_500000 for the Glediator but after some time the sequence stop coming as it displaying an
Error Options: Wrong number_of_boards size.
However I double check the matrix and the order is perfect I don’t what cause this error to occured. Please note I am using Ubuntu having Java 1.7 installed @ my system and I am using WS2812 Pixel Strip, please suggest if you have any solution regarding this,
Thanks,
Dev
Hello,
Excellent tutorial, I’m trying to build a system like this at home, but I’m not able to download Glediator. When I click on the download links I am informed that the page is not working. Would you let me know if there is another way to download.
Thank you
I found version 2.0.3 of Glediator in my personal archive. I do not not what the latest version is (probably the 2.0.3 one). I have temporarily put Glediator and the Arduino sketch in the downloads section, until the Solderlab website comes back online.
Hi guys, you have done a great job that many people enjoy.
I have installed the Glediator_V2.jar on a Windows 8, but I can not select any COM-Port. The drop-down list is empty.
And yes, I have done:
4. Copy rxtxParallel.dll to C:\Program Files (x86)\Java\jre1.8.0_121\bin\
5. Copy rxtxSerial.dll to C:\Program Files (x86)\Java\jre1.8.0_121\bin\
6. Copy RXTXcomm.jar to C:\Program Files (x86)\Java\jre1.8.0_121\lib\ext\
7. Reboot.
Also, I want to build the matrix 30×16 from WS2812B strips. From your experience should I use the black_PCB or white_PCB strips?
I know that this is an old story for you now, but today Arduino is an ancient product and I would like to use an ESP-01 circuit (which is much smaller, more powerfull and faster, not to mention cheaper) to drive the strip. Is there any way to understand and modify the code:
…
asm volatile
(
” ldi %0,8 \n\t” // 0
“loop%=:out %2, %3 \n\t” // 1
“lsl %1 \n\t” // 2
“dec %0 \n\t” // 3
…
in the ws2812_sendarray function?
Also, are you sure the 3pin WS2812B strip is fast enough to handle the frame rate? I have read, that the 4pin WS2801 strips (with the extra clock signal wire) are faster (and more expensive).
Thank you for your answer.
Tony
Hi Tony, I do not own Windows 8 so I am able to help you with that question.
About the white or black LED strips: I only have white PCB strips, I guess it just depends on taste and where you want to stick them on.
Running it on ESP8266 instead of Arduino sounds like a fun project to try. Probably someone already tried, so I should Google it some time :p
I also have no experience with the 4pin WS2801 strips, they are still on my wish list.
Unfortunately, I can’t help you with these questions. But if you find the answers to them, then make sure to put them online somewhere. so it can help others. That is the main reason why I started this blog a while ago 😉
Hi again guys.
When I could not use Glediator on Windows, I bent my old hed and tried to install Glediator on Raspberry Pi3 according to your Linux instructions.
This is what I got at the end:
[email protected]:~/dist $ java -jar Glediator_V2.jar
Exception in thread “main” java.lang.ExceptionInInitializerError
at com.jtattoo.plaf.AbstractLookAndFeel.(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1874)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:582)
at Main.GlediatorView.main(GlediatorView.java:300)
Caused by: java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at sun.awt.HeadlessToolkit.getScreenSize(HeadlessToolkit.java:284)
at com.jtattoo.plaf.JTattooUtilities.(Unknown Source)
… 6 more
I know, you Linux guys are pretty confident, that every human has deep Linux experience. But unfortunately, I don’t.
Can you help me with this problem?
Hi Tony, I do not have experience running Glediator on a Raspberry Pi, but did you install the full Raspbian with desktop or the lite version without the desktop?
Additional info to previous comment:
I also tried:
export DISPLAY=:0.0
before the java command, but that gave me:
Exception in thread “main” java.awt.AWTError: Can’t connect to X11 window server using ‘:0.0’ as the value of the DISPLAY variable.
This finally worked:
unset DISPLAY
export DISPLAY=:0
java -Djava.awt.headless=false -jar Glediator_V2.jar
—————————————–
all this is just Babylon language for me and I don’t know if it works next time, so take it for what it is… just trying to help someone in a similar situation 🙂
Hi,
thank you for your answer and yes, I am really happy that some Linux guy tries to help me instead of telling me RTFM !
I have the full Raspbian with desktop.
And as you see here above, I managed to start the Glediator.
But now I have problem to see the serial output port.
I found the video:
https://www.reddit.com/r/raspberry_pi/comments/2ztglh/how_to_use_the_glediator_led_matrix_animation/
It showes a couple of export commands, that have to be typed in and there should be a file, where one can edit these lines instead of typing them on each reboot. But the file mentioned “bashrc” in the video does not exist in my /etc/ folder.
Only:
bash.bashrc
bash_completion
bash_completion.d
so I edited the bash.bashrc and included the lines:
export CLASSPATH=/usr/share/java/RXTXcomm.jar
export LD_LIBRARY_PATH=/usr/lib/jni
unset DISPLAY
export DISPLAY=:0
but it seems that these lines do not take effect.
I have to type them manually.
But what is worse, the serial output still does not work:
[email protected]:~/dist $ java -Djava.awt.headless=false -jar Glediator_V2.jar
WARNING: RXTX Version mismatch
Jar version = RXTX-2.2-20081207 Cloudhopper Build rxtx.cloudhopper.net
native lib Version = RXTX-2.2pre2
Number of COM ports found: 0
hola me sale este error
Arduino:1.8.10 (Windows 10), Tarjeta:”Arduino Leonardo”
C:\Users\manue\Desktop\Glediator\ws2812_glediator\WS2812_Glediator\WS2812_Glediator.ino: In function ‘void setup()’:
WS2812_Glediator:68:3: error: ‘UCSR0A’ was not declared in this scope
UCSR0A |= (1<<U2X0);
^~~~~~
C:\Users\manue\Desktop\Glediator\ws2812_glediator\WS2812_Glediator\WS2812_Glediator.ino:68:3: note: suggested alternative: 'UCSR1A'
UCSR0A |= (1<<U2X0);
^~~~~~
UCSR1A
WS2812_Glediator:68:17: error: 'U2X0' was not declared in this scope
UCSR0A |= (1<<U2X0);
^~~~
C:\Users\manue\Desktop\Glediator\ws2812_glediator\WS2812_Glediator\WS2812_Glediator.ino:68:17: note: suggested alternative: 'U2X1'
UCSR0A |= (1<<U2X0);
^~~~
U2X1
WS2812_Glediator:69:3: error: 'UCSR0B' was not declared in this scope
UCSR0B |= (1<<RXEN0) | (1<<TXEN0) | (1<<RXCIE0);
^~~~~~
C:\Users\manue\Desktop\Glediator\ws2812_glediator\WS2812_Glediator\WS2812_Glediator.ino:69:3: note: suggested alternative: 'UCSR1B'
UCSR0B |= (1<<RXEN0) | (1<<TXEN0) | (1<<RXCIE0);
^~~~~~
UCSR1B
WS2812_Glediator:69:17: error: 'RXEN0' was not declared in this scope
UCSR0B |= (1<<RXEN0) | (1<<TXEN0) | (1<<RXCIE0);
^~~~~
C:\Users\manue\Desktop\Glediator\ws2812_glediator\WS2812_Glediator\WS2812_Glediator.ino:69:17: note: suggested alternative: 'RXEN1'
UCSR0B |= (1<<RXEN0) | (1<<TXEN0) | (1<<RXCIE0);
^~~~~
RXEN1
WS2812_Glediator:69:31: error: 'TXEN0' was not declared in this scope
UCSR0B |= (1<<RXEN0) | (1<<TXEN0) | (1<<RXCIE0);
^~~~~
C:\Users\manue\Desktop\Glediator\ws2812_glediator\WS2812_Glediator\WS2812_Glediator.ino:69:31: note: suggested alternative: 'TXEN1'
UCSR0B |= (1<<RXEN0) | (1<<TXEN0) | (1<<RXCIE0);
^~~~~
TXEN1
WS2812_Glediator:69:44: error: 'RXCIE0' was not declared in this scope
UCSR0B |= (1<<RXEN0) | (1<<TXEN0) | (1<<RXCIE0);
^~~~~~
C:\Users\manue\Desktop\Glediator\ws2812_glediator\WS2812_Glediator\WS2812_Glediator.ino:69:44: note: suggested alternative: 'RXCIE1'
UCSR0B |= (1<<RXEN0) | (1<<TXEN0) | (1<<RXCIE0);
^~~~~~
RXCIE1
WS2812_Glediator:70:3: error: 'UCSR0C' was not declared in this scope
UCSR0C |= (1<<UCSZ01) | (1<<UCSZ00) ;
^~~~~~
C:\Users\manue\Desktop\Glediator\ws2812_glediator\WS2812_Glediator\WS2812_Glediator.ino:70:3: note: suggested alternative: 'UCSR1C'
UCSR0C |= (1<<UCSZ01) | (1<<UCSZ00) ;
^~~~~~
UCSR1C
WS2812_Glediator:70:17: error: 'UCSZ01' was not declared in this scope
UCSR0C |= (1<<UCSZ01) | (1<<UCSZ00) ;
^~~~~~
C:\Users\manue\Desktop\Glediator\ws2812_glediator\WS2812_Glediator\WS2812_Glediator.ino:70:17: note: suggested alternative: 'UCSZ11'
UCSR0C |= (1<<UCSZ01) | (1<<UCSZ00) ;
^~~~~~
UCSZ11
WS2812_Glediator:70:31: error: 'UCSZ00' was not declared in this scope
UCSR0C |= (1<<UCSZ01) | (1<<UCSZ00) ;
^~~~~~
C:\Users\manue\Desktop\Glediator\ws2812_glediator\WS2812_Glediator\WS2812_Glediator.ino:70:31: note: suggested alternative: 'UCSZ10'
UCSR0C |= (1<<UCSZ01) | (1< Preferencias.
como puedo solucionarlo es en el arduino
gracias de antemano
ayuda