SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By sasukenebe100
#186772
Hello,

I receiving an error message when I try to add the Neopixel library to my Photon Redboard. I was unable to find definitive information online in regards to this. Not sure if having a Redboard as opposed to just a Photon could be causing the problem?
Any information or help would be greatly appreciated. I have posted the error message below. (it lists multiple issues).

Thanks,
Gary



neopixel/neopixel.cpp:60:4: error: #error "*** PLATFORM_ID not supported by this library. PLATFORM should be Core or Photon ***"
#error "*** PLATFORM_ID not supported by this library. PLATFORM should be Core or Photon ***"
^

In file included from neopixel/neopixel.cpp:50:0:
neopixel/neopixel.h: In constructor 'Adafruit_NeoPixel::Adafruit_NeoPixel(uint16_t, uint8_t, uint8_t)':
neopixel/neopixel.h:99:5: warning: 'Adafruit_NeoPixel::pixels' will be initialized after [-Wreorder]
*pixels; // Holds LED color values (3 bytes each)
^
neopixel/neopixel.h:95:5: warning: 'const uint8_t Adafruit_NeoPixel::type' [-Wreorder]
type; // Pixel type flag (400 vs 800 KHz)
^
neopixel/neopixel.cpp:65:1: warning: when initialized here [-Wreorder]
Adafruit_NeoPixel::Adafruit_NeoPixel(uint16_t n, uint8_t p, uint8_t t) :
^
neopixel/neopixel.cpp: In member function 'void Adafruit_NeoPixel::show()':
This looks like an error in neopixel library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
This looks like an error in neopixel library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
This looks like an error in neopixel library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
This looks like an error in neopixel library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
This looks like an error in neopixel library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
This looks like an error in neopixel library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
This looks like an error in neopixel library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
neopixel/neopixel.cpp:63:48: error: 'pinHI' was not declared in this scope
#define pinSet(_pin, _hilo) (_hilo ? pinHI(_pin) : pinLO(_pin))
^

neopixel/neopixel.cpp:135:9: note: in expansion of macro 'pinSet'
pinSet(pin, HIGH); // HIGH
^
This looks like an error in neopixel library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
neopixel/neopixel.cpp:63:62: error: 'pinLO' was not declared in this scope
#define pinSet(_pin, _hilo) (_hilo ? pinHI(_pin) : pinLO(_pin))
^

neopixel/neopixel.cpp:135:9: note: in expansion of macro 'pinSet'
pinSet(pin, HIGH); // HIGH
^
neopixel/neopixel.cpp:63:48: error: 'pinHI' was not declared in this scope
#define pinSet(_pin, _hilo) (_hilo ? pinHI(_pin) : pinLO(_pin))
^
neopixel/neopixel.cpp:271:9: note: in expansion of macro 'pinSet'
pinSet(pin, HIGH); // HIGH
^
neopixel/neopixel.cpp:63:62: error: 'pinLO' was not declared in this scope
#define pinSet(_pin, _hilo) (_hilo ? pinHI(_pin) : pinLO(_pin))
^
neopixel/neopixel.cpp:271:9: note: in expansion of macro 'pinSet'
pinSet(pin, HIGH); // HIGH
^
neopixel/neopixel.cpp:63:48: error: 'pinHI' was not declared in this scope
#define pinSet(_pin, _hilo) (_hilo ? pinHI(_pin) : pinLO(_pin))
^
neopixel/neopixel.cpp:429:9: note: in expansion of macro 'pinSet'
pinSet(pin, HIGH); // HIGH
^
neopixel/neopixel.cpp:63:62: error: 'pinLO' was not declared in this scope
#define pinSet(_pin, _hilo) (_hilo ? pinHI(_pin) : pinLO(_pin))
^
neopixel/neopixel.cpp:429:9: note: in expansion of macro 'pinSet'
pinSet(pin, HIGH); // HIGH
^
neopixel/neopixel.cpp:63:48: error: 'pinHI' was not declared in this scope
#define pinSet(_pin, _hilo) (_hilo ? pinHI(_pin) : pinLO(_pin))
^
neopixel/neopixel.cpp:565:7: note: in expansion of macro 'pinSet'
pinSet(pin, LOW); // LOW
^
neopixel/neopixel.cpp:63:62: error: 'pinLO' was not declared in this scope
#define pinSet(_pin, _hilo) (_hilo ? pinHI(_pin) : pinLO(_pin))
^
neopixel/neopixel.cpp:565:7: note: in expansion of macro 'pinSet'
pinSet(pin, LOW); // LOW
^
make[1]: *** [../build/target/user/platform-8neopixel/neopixel.o] Error 1
make: *** [user] Error 2
User avatar
By darrellg
#186780
sasukenebe100 wrote:I receiving an error message when I try to add the Neopixel library to my Photon Redboard. I was unable to find definitive information online in regards to this. Not sure if having a Redboard as opposed to just a Photon could be causing the problem?
Any information or help would be greatly appreciated.
The Neopixel library is full of assembly code that is specific to the 8-bit AVR microcontrollers. It won't work on other platforms without extensive modification.
By sasukenebe100
#186786
Thanks for the responses. I think this library is not the library you are referring to. It is a library specifically for spark core and photon. Either way, I have good news: I got my code working by commenting out all #if statements concerning the PRODUCT_ID. The library now works like a charm!