Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not compiling on platformio, when selecting nodemcuv2 #754

Open
gnkarn opened this Issue Mar 13, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@gnkarn
Copy link

gnkarn commented Mar 13, 2019

in this project im using a nodemcu , apa102 leds , and an apds9960 .

if i use D1mini as the set on patformio it compiles ok,
but when using nodemcuv2 ( ESP12F) , i get the following error
required`` from 'CLEDController& CFastLED::addLeds(CRGB*, int, int) [with ESPIChipsets CHIPSET = (ESPIChipsets)5u; unsigned char DATA_PIN = 14u; unsigned char CLOCK_PIN = 13u; EOrder RGB_ORDE R = (EOrder)136u; unsigned char SPI_DATA_RATE = 4u]' src/main.cpp:464:79: required from here /Users/Gus-nuevo/.platformio/lib/FastLED_ID126/fastpin.h:207:2: error: static assertion failed: Invalid pin specified static_assert(validpin(), "Invalid pin specified");

i think is not accepting the pins selected , when using nodemcu , but it is when selecting D1mini , as im using a NodeMCU ( and is working fine) , there should be not reason for claiming such error .
tks

@focalintent

This comment has been minimized.

Copy link
Member

focalintent commented Mar 13, 2019

FastLED does pin/port mapping on its own based on the definition of the platform, and if it doesn't have one it'll fall back to a default mapping -- you can see the mappings for different platforms that've been defined so far here - https://github.com/FastLED/FastLED/blob/master/platforms/esp/8266/fastpin_esp8266.h -- specifically, the nodemcu definition in FastLED only defines 11 pins, 0-10

Since you're using pin 13 and 14, my guess is that you're already trying to use the raw PIN numbers (vs. how nodemcu was labeling them in older versions) - in which case adding a define for FASTLED_ESP8266_RAW_PIN_ORDER before you include FastLED will tell the library to use a direct mapping - e.g.:

#define FASTLED_ESP8266_RAW_PIN_ORDER 1
#include <FastLED.h>
@focalintent

This comment has been minimized.

Copy link
Member

focalintent commented Mar 13, 2019

(pin specification on esp8266 boards out there was/is kind of a nightmare, with a variety of board manufacturers using arbitrary numbers on the silkscreens for the boards (I guess to keep the external pin numbering nice and neat?) - I gave up trying to track all the variations, and it didn't help that for some of those variations, folks were ignoring the numbers on the b board and just going with the raw gpio pin numbers anyway)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.