NoiseSmearingPalettes with SmartMatrix3 library


#1

Hello guys,

can somebody help me, migrating the NoiseSmearingPalettes pattern (made by Jason Coon) to the new sm3 library ?

I’ve already checked the migration help file from the sm3 library, but I’m not able to get that sketch to life. I’ve have taken a look on the [PatternNoiseSmearing.h file] (https://github.com/pixelmatix/aurora/blob/master/PatternNoiseSmearing.h) in the aurora project too, but I’m not getting smarter.

Can somebody tell me how to translate the following syntaxes:

  • the two CRGB leds code lines (line 21-22), and as followed, everywhere in the sketch the “leds” & “leds2” syntaxes (the difficulty is, that there are two of “CRGB leds”)
  • the PIXELA and PIXELB code lines (starting with line 344)
  • the following code line: “leds[i].nscale8(value);” (line 247. When I’m changing “leds” to “buffer”, as in the migration file described, I’m getting the error, that nscale8 is not member of buffer(I know it’s a beginner mistake :sweat_smile:)

I’m new to smartmatrix, but I don’t believe in obstacles when it comes to reach the goal. I would appreciate, if somebody can help with this issue.

Thanks in advance
Amiel


#2

I just pushed changes to update it to SmartMatrix3: https://gist.github.com/jasoncoon/d0d04e0c8adddfd2e07e

Most of the changes required are documented here: https://github.com/pixelmatix/SmartMatrix/blob/sm3.0/MIGRATION.md

I also had to add a bunch of forward declarations for functions to fix build errors (I could have rearranged the functions instead). This is a known issue in newer versions of Arduino with large libraries like SmartMatrix and FastLED.


#3

Thanks a lot Jason,
I appreciate your fast work and help.

Now it works perfectly, and the other patterns are working too. It looks adorable.

Thanks for the advices too :slight_smile: