XENON / ARGON - Neopixel.cpp error

I am using a lot of Neopixels in my projects.
After receiving my ARGONS and XENONS I wanted to put some LED’s on and light the place up, but god this error.

#error "*** PLATFORM_ID not supported by this library. PLATFORM should be Core, Photon, P1, Electron or RedBear Duo ***"

I Know that it must be because the lib is referenced to the device_ID, and not supporting the new MESH devices,
then my question is, is there a way around this? or will the lib be updated? :slight_smile:
Thanks,

You can file an issue on the author’s github repo if listed in the IDE. Otherwise, you’ll have to copy the library contents and add the functionality yourself. If you patient, someone else will probably get to it. It’s a little early for all the porting to be completed by the respective authors.

1 Like

There is an open pull request for the neopixel library to support mesh devices. As the neopixel library is just two files, you could just copy the fixed neopixel.cpp and neopixel.h files until the verified library is updated, as well.

4 Likes

I can confirm that this works on the Boron.

Now if I can only get WS2812FX to compile, I’d be very happy!

Peter

I can confirm this works with an Argon! Thank you!!!

The official library has been updated! No need to copy and paste from the pull request.

3 Likes

And FWIW WS2812FX also compiles and works with the new library.

Peter

Did it work directly with the Argon, or did you have to use a logic shifter? If yes, which one did you use, and any connection diagram for it?

Thanks in advance

It worked directly. I did not need a logic shifter. That being said, the pull request has been incorporated so you should be able to use the library directly now. :slight_smile:

ok cool… Thanks for the info :slight_smile:

I tried this today and had to use a level shifter. Hmmm…

I used a level shifter (BSS138) from Adafruit and the neopixel device is their 24 pixel ring, FWIW.

I know it has been well over a year since it says this issue was fixed, but I am trying to use the neopixel library and the Particle Argon with my IoT class, and I am seeing the same error that started this thread. Any suggestions on what might be amiss?

c:/Users/IoTPa/Documents/Brian/Particle/NeoMatrix/lib/neopixel/src/neopixel.cpp:63y this library. PLATFORM should be Core, Photon, P1, Electron or RedBear Duo ***"
   #error "*** PLATFORM_ID not supported by this library. PLATFORM should be Core,

What version of he library are you using?
The latest version contains this in neopixel.cpp

#if PLATFORM_ID == 0 // Core (0)
  #define pinLO(_pin) (PIN_MAP[_pin].gpio_peripheral->BRR = PIN_MAP[_pin].gpio_pin)
  #define pinHI(_pin) (PIN_MAP[_pin].gpio_peripheral->BSRR = PIN_MAP[_pin].gpio_pin)
#elif (PLATFORM_ID == 6) || (PLATFORM_ID == 8) || (PLATFORM_ID == 10) || (PLATFORM_ID == 88) // Photon (6), P1 (8), Electron (10) or Redbear Duo (88)
  STM32_Pin_Info* PIN_MAP2 = HAL_Pin_Map(); // Pointer required for highest access speed
  #define pinLO(_pin) (PIN_MAP2[_pin].gpio_peripheral->BSRRH = PIN_MAP2[_pin].gpio_pin)
  #define pinHI(_pin) (PIN_MAP2[_pin].gpio_peripheral->BSRRL = PIN_MAP2[_pin].gpio_pin)
#elif (PLATFORM_ID == 12) || (PLATFORM_ID == 13) || (PLATFORM_ID == 14) // Argon (12), Boron (13), Xenon (14)
  #include "nrf.h"
  #include "nrf_gpio.h"
  #include "pinmap_impl.h"
  NRF5x_Pin_Info* PIN_MAP2 = HAL_Pin_Map();
  #define pinLO(_pin) (nrf_gpio_pin_clear(NRF_GPIO_PIN_MAP(PIN_MAP2[_pin].gpio_port, PIN_MAP2[_pin].gpio_pin)))
  #define pinHI(_pin) (nrf_gpio_pin_set(NRF_GPIO_PIN_MAP(PIN_MAP2[_pin].gpio_port, PIN_MAP2[_pin].gpio_pin)))
#else
  #error "*** PLATFORM_ID not supported by this library. PLATFORM should be Particle Core, Photon, Electron, Argon, Boron, Xenon and RedBear Duo ***"
#endif

If yours doesn’t you are not using the correct version

@ScruffR Thank you.
I am using a NeoPixel Matrix. When I install the neopixelmatrix library (using Install Library in VScode) it installs the neopixel library - however, it installs an earlier version that does not have the PLATFORM_ID == 12 definitions.

So, if I install nepixel 1.0.0 [verified] first, then I can get the right neopixel library. I guess that is why the [verified] is important.

Is there a way to notify someone about the issues with neopixelmatrix 0.0.1?

If the contributor has provided a link to the GitHub repo of the library and has allowed issue reports, that would be the place to do that.

For the library in question both conditions are true so you can do that here

But on checking the library.properties file of that library it already is referencing the 1.0.0 version of the neopixel library but the contributor obviously forgot to upload and publish the updated version to the Particle Library repository.

I just filed an issue for that

1 Like

@Rashap, I got confirmation of @delianides that he has uploaded his updated version to the Particle library repository.

Thank you for both the follow-up and teaching me how to do this.
Regards,
Brian

1 Like