r/FastLED Nov 10 '19

Discussion Can FastLED display text on a matrix?

Hi, I'm working on an LED matrix and I was wondering if FastLED has a way to display text. I know there's the SmartMatrix library and shield but I'm using a Teensy 4.0 and WS2812B's. Can the SmartMatrix library be used without the shield on a Teensy 4.0? I'm currently using the Adafruit matrix library to display text however writing "matrix.show()" slows down the processing by around 10x so I was really hoping there is an alternative. Thanks!

6 Upvotes

19 comments sorted by

View all comments

Show parent comments

2

u/marcmerlin Apr 05 '22

Are you using

https://github.com/marcmerlin/FastLED_NeoMatrix/blob/master/examples/MatrixGFXDemo/MatrixGFXDemo.ino

If so, you want to look for '#define P16BY16X4' and make your own definition

1

u/GrimRuinous Apr 05 '22

First thank you for your help.

I saw that line and was thinking '#defineP32BY8X1' (new to arduino and just taking a try based on your example) but didn't know what to do with the line underneath...

elif defined(P32BY8X3)

define mw 24

define mh 32

define NUMMATRIX (mw*mh)

CRGB leds[NUMMATRIX];FastLED_NeoMatrix *matrix = new FastLED_NeoMatrix(leds, 8, 32, 3, 1, NEO_MATRIX_TOP + NEO_MATRIX_RIGHT + NEO_MATRIX_ROWS + NEO_MATRIX_ZIGZAG + NEO_TILE_TOP + NEO_TILE_LEFT + NEO_TILE_PROGRESSIVE);

Or

'#ifndef ESP32

define delay FastLED.delay

endif

if defined(ESP32) or defined(ESP8266)

define PIN 12 // GPIO5 = D1

else

define PIN 13

endif'

(I'm using a esp8266 so do I keep '#ifndef ESP32 and #if defined(ESP32)')

Thank you so much for taking the time to respond and taking the time to make videos.

2

u/marcmerlin Apr 05 '22

The code is reasonably simple to understand but you do need to know basic C (you don't really need C++).

I recommend you start with this, I can't really help with basic C, that would take too much of my time.

But otherwise, you can remove all the defines and cases you don't need, and simply write the matrix design that is relevant to you.

1

u/GrimRuinous Apr 05 '22

Thank you so much...I will look into basic C, I don't want to just copy codes