Difficulty compiling with Adafruit_NeoPixel.h

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
MarathonMannUK
 
Posts: 2
Joined: Tue Jan 10, 2023 10:57 am

Difficulty compiling with Adafruit_NeoPixel.h

Post by MarathonMannUK »

Hi. I am having difficulty making any sketch compile with this library. It doesn't seem to make any difference what version I use and I have tried using the example sketches included in the library. I am able to compile other sketches and load to my card. I am using a WeMos card. errors below. It reads like a syntax error in the library but that can't be right!:

/Users/richardmann/Documents/Arduino/libraries/Adafruit_NeoPixel/esp8266.c:20:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
IRAM_ATTR void espShow(
^
/Users/richardmann/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:232:12: error: 'IRAM_ATTR' does not name a type
extern "C" IRAM_ATTR void espShow(uint16_t pin, uint8_t *pixels,
^
/Users/richardmann/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp: In member function 'void Adafruit_NeoPixel::show()':
/Users/richardmann/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:2926:42: error: 'espShow' was not declared in this scope
espShow(pin, pixels, numBytes, is800KHz);
^

exit status 1

Compilation error: exit status 1

User avatar
dastels
 
Posts: 15662
Joined: Tue Oct 20, 2015 3:22 pm

Re: Difficulty compiling with Adafruit_NeoPixel.h

Post by dastels »

It looks like something in the installation/configuration. What do you have selected as the board? Is everything up to date (board support packages and libraries)?

Dave

User avatar
MarathonMannUK
 
Posts: 2
Joined: Tue Jan 10, 2023 10:57 am

Re: Difficulty compiling with Adafruit_NeoPixel.h

Post by MarathonMannUK »

Thank you! My board is a WeMos D1 included in the ESP8266 package. This was version 2.5.2 so I replaced it with version 3.0.2. My sketch now compiles OK

User avatar
dastels
 
Posts: 15662
Joined: Tue Oct 20, 2015 3:22 pm

Re: Difficulty compiling with Adafruit_NeoPixel.h

Post by dastels »

Awesome! It pays to keep everything updated.

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”