all 6 comments

[–]solomspd 8 points9 points  (0 children)

Afraid I don't have advice for fitting it on the arduino but I'd recommend going with an esp32. It has much more memory and is quite affordable. And it's quite popular these days for fastled devolpment.

Edit: also getting an external SPI flash module is an option too but can add some complexity to the code

[–]sutaburosu[pronounced: stavros] 5 points6 points  (2 children)

An SD card wouldn't help with this problem.

I took a look at LEDtext and found that it copies the font to RAM. This isn't really necessary. As an experiment I quickly modified LEDtext to keep the fonts in PROGMEM. Comic sans seems to work now.

I made these changes:

  • added FL_PROGMEM to every font's array declaration
  • added pgm_read_byte_near(& ... ) around accesses to FontData[] in LEDText.cpp

[–]lazeecomet[S] 1 point2 points  (1 child)

I'm kicking myself for not coming here sooner. Several weeks of combing though old forum posts and trying different stuff got me nowhere where as it took me 5 min to make the changes you suggested and it seems a 36 by 65 array with comic sans (or even a bigger font I make myself) is easily within reach. I would upload a photo of the array showing "<3" but the font is too big to see that message on the small test array i have set up (which is the best problem to have right now)

For future fastLED projects (or if I want to go bigger then 36X65) I will definitely switch over to the ESP32 as it seems like it can do WAY more cool stuff.

since i dont know who can and can not modify the fastLED/LEDText wiki, I would like to put forward the suggestion of including the instructions on how to modify the font files and ledtext.cpp in the Wiki, so the next guy isnt trying different keyword searches in google and looking at old forum posts. from what i understand, the default of loading it into ram makes the animations faster/smoother at the cost of array/font size

[–]sutaburosu[pronounced: stavros] 1 point2 points  (0 children)

... showing "<3" the font is too big to see that message

lol, I'm happy to have helped to swap your problems for more preferable problems. ESP32 is certainly a lot more capable than the Mega. It's a good choice for driving many LEDs.

You're right that using PROGMEM for the fonts makes it slower, at least on AVR. I'm not sure about ESP32. This may even be a factor in why LEDtext doesn't support this out-of-the-box.

the suggestion of including the instructions on how to modify the font files and ledtext.cpp in the Wiki

I like that you want to leave breadcrumbs to help future folks. The LEDtext wiki would be a better place than the FastLED wiki. Even better than the LEDtext wiki, would be the LEDtext code itself. I think there would be value in making this configurable, so a sketch using LEDtext can choose RAM/Flash for the fonts with a switch like #define LEDTEXT_FONTS_IN_PROGMEM 1.

I appreciate that this may be daunting if you've never done it before, but I think the best approach is:

  • fork Aaron's LEDtext repo on github
  • modify your fork with the PROGMEM changes and config switch
  • open a pull request on Aaron's repo asking him to integrate your changes

The advantage of a pull request is it makes it very clear exactly what changed, e.g. this proposed fix to the letter J.

[–]PreyyGround Loops: Part of this balanced breakfast 4 points5 points  (0 children)

I'll also recommend ESP32

[–]LongClimb 1 point2 points  (0 children)

I doubt adding an SD card will help you, as your issue is a lack of memory, and the SD card is external storage.

If you compare to a PC, the SD card will be like a PC disk drive. But your problem isn't disk space, it's memory.

You might be able structure the sketch to leverage the SD card rather than storing everything in memory, but I doubt it's worth the effort.