I have downloaded the WS2812 FX Library for Arduino and ESP8266 .
When I try to compile any one of the ws2812fx.ino files, because it is calling the WS2812FX.h, for some reason it does not see or know where the said file is..
It is here:
WS2812FX-master / src / ws2812fx.hc
Is there anyway which the ino file will compile ok and know where the ws2812fx.h is.
What do I need to do here.
Thanks
ws2812fx.hc is not the same as WS2812FX.h
I don't have that library so I can't try this, but try renaming the .hc file to .h
Pete
Apologies, it ws a typo error.
The said file is of course WS2812FX.h, which is being called by any one of the examples included.
This is the link for the library files:
Thanks
It is here:
WS2812FX-master / src / ws2812fx.hc
Is that in the Arduino libraries directory? i.e. is its path "libraries/WS2812FX-master/src/ws2812fx.c" ?
Pete
el_supremo:
Is that in the Arduino libraries directory? i.e. is its path "libraries/WS2812FX-master/src/ws2812fx.c" ?
Pete
No it isn't as I am running a linux machine and all my arduino files etc are in the sketchbook folder. Actually, correct that, I do have a sketchbook\libraries folder, and I have just extracted the said zip file into it.
But when I try to compile ws2812fx_custom_effect.ino, I know get a whole list of errors:
home/rob/sketchbook/libraries/WS2812FX-master/src/WS2812FX.cpp: In member function 'void WS2812FX::setPixelColor(uint16_t, uint32_t)':
/home/rob/sketchbook/libraries/WS2812FX-master/src/WS2812FX.cpp:99:49: error: 'gamma8' was not declared in this scope
Adafruit_NeoPixel::setPixelColor(n, gamma8(r), gamma8(g), gamma8(b), gamma8(w));
^
/home/rob/sketchbook/libraries/WS2812FX-master/src/WS2812FX.cpp: In member function 'void WS2812FX::setPixelColor(uint16_t, uint8_t, uint8_t, uint8_t)':
/home/rob/sketchbook/libraries/WS2812FX-master/src/WS2812FX.cpp:107:49: error: 'gamma8' was not declared in this scope
Adafruit_NeoPixel::setPixelColor(n, gamma8(r), gamma8(g), gamma8(b));
^
/home/rob/sketchbook/libraries/WS2812FX-master/src/WS2812FX.cpp: In member function 'void WS2812FX::setPixelColor(uint16_t, uint8_t, uint8_t, uint8_t, uint8_t)':
/home/rob/sketchbook/libraries/WS2812FX-master/src/WS2812FX.cpp:115:49: error: 'gamma8' was not declared in this scope
Adafruit_NeoPixel::setPixelColor(n, gamma8(r), gamma8(g), gamma8(b), gamma8(w));
^
/home/rob/sketchbook/libraries/WS2812FX-master/src/WS2812FX.cpp: In member function 'uint16_t WS2812FX::mode_running_lights()':
/home/rob/sketchbook/libraries/WS2812FX-master/src/WS2812FX.cpp:825:78: error: 'sine8' was not declared in this scope
int lum = (int)sine8(((i + SEGMENT_RUNTIME.counter_mode_step) * sineIncr));
Are the above errors down to my setup or something else.
Thanks
From the ws2812fx.h file:
NOTES
* Uses the Adafruit NeoPixel library. Get it here:
https://github.com/adafruit/Adafruit_NeoPixel
Pete
el_supremo:
From the ws2812fx.h file:
NOTES
* Uses the Adafruit NeoPixel library. Get it here:
GitHub - adafruit/Adafruit_NeoPixel: Arduino library for controlling single-wire LED pixels (NeoPixel, WS2812, etc.)
Pete
Ok, but does that meant that the whole WS2812FX library has to be under the Neopixel library, or just the ws2812fx.h file.
Both the WS2812FX and Neopixel libraries must be in your arduino libraries directory (one is not "under" the other).
Pete
Thanks, I realised that after my last post.
Yes both Adafruit Neopixel and the WS2812FX libraries are under /sketchbook/libraries now and the said ino file does compile and run.
Something so simple Doh!