PIR to SAMD21 to WS28212b Fade Color 250730

Hello gcjr, alto777 and the Arduino forum,

Shout out to gcjr for providing a complete sketch in post 16.

Can't get the sketch to compile. The error message is:
In file included from c:\Users\pitts\OneDrive\Documents\Arduino\libraries\FastLED\src/FastLED.h:83:0,

  •             from F:\Electronics\Alpha_Digital_Architectural_Lighting\Architectural_lights\Strip Lights\WS2812b\PIR_to_SAMD21_to_WS28212b_Fade_Color_250801\PIR_to_SAMD21_to_WS28212b_Fade_Color_250801\PIR_to_SAMD21_to_WS28212b_Fade_Color_250801.ino:16:*
    

c:\Users\pitts\OneDrive\Documents\Arduino\libraries\FastLED\src/fastspi.h:171:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

  • pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"*

  •                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
    

Sketch uses 3618 bytes (44%) of program storage space. Maximum is 8192 bytes.
Global variables use 1029 bytes (200%) of dynamic memory, leaving -517 bytes for local variables. Maximum is 512 bytes.
Not enough memory; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing your footprint.
data section exceeds available space in board

Compilation error: data section exceeds available space in board

Not sure how this can be because the sketch is not being sent to a board but rather is simply being compiled on my laptop.

The error message recommends the link
Recommended link for data exceeds available space

The recommended link talks 'outputting lots of text to serial,' There are no serial outputs in the code.
Other recommendations:

  1. Optimize variables. Remove unused variables and be economical with the data types you use. Don’t use long (4 bytes) if only int (2 bytes) are needed. Don’t use float if only whole numbers will be assigned.

  2. Declare variables as locally as possible to save memory:

Anything declared at global scope will exist for the entire lifetime of the sketch.
Variables that are only used inside one function, can be declared within that function.
If a variable needs to be shared between multiple functions, consider passing it as a parameter.
3. Avoid recursive code to reduce memory usage. Use iterative functions instead.

  1. Minimize array sizes.

Not sure what recursive code is but I don't think there are any arrays in the sketch.

I think the sketch is going into some sort of loop and spinning out of control.

Does the sketch compile for gcjr or anyone else?

Thanks.

Allen Pitts