NederlandsKlik deze knop voor de Nederlandstalige website

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 adressable 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 to make your own lightshow. 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.

5x8 RGB LED WS2812B Arduino NeoPixel shield
5×8 RGB LED WS2812B Arduino NeoPixel shield

Installing and testing the Arduino NeoPixel shield

  1. 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.
  2. Attach the shield to your Arduino and hook the Arduino up to your computer.
  3. 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
  4. 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

    and change it to

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.

  1. Go to this Solderlab downloads page for the ‘WS2812-Glediator-Interface’ sketch and download the file ‘ws2812_glediator.zip’
  2. Unzip the file, open the sketch ‘WS2812_Glediator.ino’ in the Arduino IDE and upload it to your Arduino
Glediator GUI
Glediator GUI

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

  1. Go to the Glediator downloads page and download the current version.
  2. Extract the downloaded archive.
  3. Then open a terminal window.
  4. Navigate to the dist folder and run the .jar file like this:
    java -jar Glediator_V2.jar
Arduino NeoPixel shield
Arduino NeoPixel shield

Windows: installing the RXTX Java library

  1. Make sure you have Java installed, or get it at https://www.java.com
  2. 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).
  3. Find your Java folder, mine was located at C:\Program Files (x86)\Java\jre1.8.0_121
  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.

Windows: installing and running Glediator

  1. Go to the Glediator downloads page and download the current version.
  2. Extract the downloaded archive.
  3. Navigate to the dist folder.
  4. 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
Glediator settings
Glediator settings

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

Running Glediator on 5x8 RGB LED WS2812B Arduino NeoPixel shield
Running Glediator on 5×8 RGB LED WS2812B Arduino NeoPixel shield
CJMCU 40 Bit 5 x 8 WS2812B 5050 RGB LED Driver Development Board
Tested and recommended by OneGuyOneBlog.com:

CJMCU 40 Bit 5 x 8 WS2812B 5050 RGB LED Driver Development Board
Geekcreit® UNO R3 ATmega328P Development Board For Arduino
Tested and recommended by OneGuyOneBlog.com:

Geekcreit® UNO R3 ATmega328P Development Board For Arduino

This post is also available in Dutch.

2 Comments

Add a Comment

Your email address will not be published. Required fields are marked *