Skip to content

"Invalid Pin Specified" Error Arduino Nano Every #1254

Open

Description

@Cai-Williams

I have a Arduino Nano Every and I have a WS2812B led strip hooked up to it and I'm trying to run FastLED on it but whenever I try to upload the sketch I get this output:

C:\Users\Documents\Arduino\libraries\FastLED/fastspi.h:130: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"

And

C\Users\Documents\Arduino\libraries\FastLED/fastpin.h:207:2: error: static assertion failed: Invalid pin specifiedstatic_assert(validpin(), "Invalid pin specified")

And no matter where I look I can't find any suggestions or fixes. This is my code:

#include <FastLED.h>

#define LED_PIN 4
#define NUM_LEDS 20

CRGB leds[NUM_LEDS];

void setup() {
FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
}

void loop() {
for (int i = 0; i <= 19; i++) {leds[i] = CRGB ( 0, 0, 255);
FastLED.show();
delay(40);
}
for (int i = 19; i >= 0; i--) {leds[i] = CRGB ( 255, 0, `0);
FastLED.show();
delay(40);
}
}

If anyone knows how to fix this or anything that might help please contact me or reply to this!

Thanks,
Cai

Activity

  1. marmilicious commented on Jun 28, 2021

    @marmilicious
    Contributor

    That warning is always present on platforms that haven't had SPI support added yet or don't support it. You can ignore that.

  2. Cai-Williams commented on Jun 28, 2021

    @Cai-Williams
    Author

    @marmilicious Thanks for your reply. When I upload the sketch It says "unable to upload to Arduino Nano Every" and I don't get any led output either. 🤷‍♂️ That might just be a fault with my led strip 🤣

  3. marmilicious commented on Jun 28, 2021

    @marmilicious
    Contributor

    I believe with release FastLED 3.4.0 the nano every was added.
    "Merged in contributed support for Arduino Nano Every / Arduino Uno Wifi Rev. 2"
    Are you using the latest version of FastLED?
    Try some different pins for your data line?
    Try posting to the FastLED Reddit group where hopefully someone that has that board can give a suggestion.

  4. Cai-Williams commented on Jun 28, 2021

    @Cai-Williams
    Author

    Okay thank you! Also yes I am using the latest version and even if I use a different pin it gives me the same output.

  5. added
    type: bug
    platform: avr
    area: core
    status: stale
    status: triage
    on Apr 16, 2026
  6. zackees commented on Jun 3, 2026

    @zackees
    Member

    Tracked in FastLED/fbuild#389 for AVR / megaAVR / ATtiny fbuild platform/build support validation.

    That fbuild issue is scoped to board metadata, toolchain/backend support, and FastLED smoke-build evidence. Any remaining FastLED source/platform-code blocker should stay linked from both sides.

  7. zackees commented on Jun 3, 2026

    @zackees
    Member

    fbuild build-system status update (tracker: FastLED/fbuild#389)

    Build-tool side is healthy (same as #716):

    • Board metadata nano_every.json present.
    • arduino_megaavr framework registered.
    • Smoke fixture at tests/platform/nano_every/ builds cleanly.
    • FastLED has m4809 pin support at src/platforms/avr/atmega/m4809/fastpin_avr_nano_every.h.

    LED_PIN 4 on Nano Every maps to PORTC bit 6 — make sure your sketch is using the m4809 fastpin table (recent FastLED versions) and not the legacy ATmega328 path. If the Invalid Pin Specified static_assert still fires on a current FastLED master, please reopen with the full preprocessor dump.

  8. removed
    status: stale
    on Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreplatform: avrstatus: triagetype: bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions