The RGB123 LED matrices are boards full of individually addressable RGB LEDs. This means that you can get a full-colour image by wiring up just 3 wires.
We'd suggest you wire up as follows. The only condition is that the data wire is connected to an SPI MOSI port on the Espruino Board:
RGB-123 | Espruino |
---|---|
GND | GND |
DIN | B15 |
5V | VBAT |
When running full-power, the RGB123 panels draw a lot of power. You may find you need to wire the 5V line up to a separate power supply.
DO NOT WIRE UP THE VOLTAGE BACKWARDS - WS2812 chips are quite delicate and the entire board can be easily blown up by doing this.
You can then use Espruino's built-in graphics library:
For an 8x8 display, use the following:
var neopixel = require("neopixel");
var leds = Graphics.createArrayBuffer(8,8,24,{zigzag:true});
leds.flip = function() { neopixel.write(B15, leds.buffer); };
// now you can draw..
leds.clear();
// a box
leds.setColor(0.1,0,0);
leds.moveTo(0,0);
leds.lineTo(7,0);
leds.lineTo(7,7);
leds.lineTo(0,7);
leds.lineTo(0,0);
// some text
leds.setColor(0.1,0.1,0.1);
leds.drawString(":)",0,1);
leds.flip();
For other sizes, change the first two arguments of createArrayBuffer
to the width and height of your display.
For more details on interfacing (or for interfacing to RGB123 strips), see WS2811 (the driver chip).
This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.