Manually adding libraries

I’m trying to add the latest Adafruit_neomatrix and Adafruit_neopixel libraries directly from github. I suspect that they might not work directly with Particle Argon 2.0.0.rc3, but I am giving them a shot.

(I was using the CLI-installed versions, but they are incompatible with JsonParserGeneratorRK, and that author mentioned it’s because they used some poor naming- but that they have since fixed those libs. So I am trying this, and I suspect it will be a learning experience.)

I have already figured out that the lib code needs to be in /lib/NAME/src, and that if it’s just sitting in /lib/NAME it won’t be found at compile.

Now it seems that some of the basic type declarations aren’t propagating

> Executing task: make -f 'C:\Users\micro\.particle\toolchains\buildscripts\1.9.2\Makefile' compile-user -s <


:::: COMPILING APPLICATION

In file included from c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:46:
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:135:9: error: 'uint16_t' does not name a type
  135 | typedef uint16_t neoPixelType; ///< 3rd arg to Adafruit_NeoPixel constructor
      |         ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:151:14: error: 'uint8_t' does not name a type
  151 | static const uint8_t PROGMEM _NeoPixelSineTable[256] = {
      |              ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:177:14: error: 'uint8_t' does not name a type
  177 | static const uint8_t PROGMEM _NeoPixelGammaTable[256] = {
      |              ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:204:29: error: expected ')' before 'n'
  204 |   Adafruit_NeoPixel(uint16_t n, uint16_t pin=6,
      |                    ~        ^~
      |                             )
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:211:28: error: 'uint16_t' has not been declared
  211 |   void              setPin(uint16_t p);
      |                            ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:212:35: error: 'uint16_t' has not been declared
  212 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b);
      |                                   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:212:47: error: 'uint8_t' has not been declared
  212 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b);
      |                                               ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:212:58: error: 'uint8_t' has not been declared
  212 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b);
      |                                                          ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:212:69: error: 'uint8_t' has not been declared
  212 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b);
      |                                                                     ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:213:35: error: 'uint16_t' has not been declared
  213 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b,
      |                                   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:213:47: error: 'uint8_t' has not been declared
  213 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b,
      |                                               ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:213:58: error: 'uint8_t' has not been declared
  213 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b,
      |                                                          ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:213:69: error: 'uint8_t' has not been declared
  213 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b,
      |                                                                     ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:214:23: error: 'uint8_t' has not been declared
  214 |                       uint8_t w);
      |                       ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:215:35: error: 'uint16_t' has not been declared
  215 |   void              setPixelColor(uint16_t n, uint32_t c);
      |                                   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:215:47: error: 'uint32_t' has not been declared
  215 |   void              setPixelColor(uint16_t n, uint32_t c);
      |                                               ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:216:26: error: 'uint32_t' has not been declared
  216 |   void              fill(uint32_t c=0, uint16_t first=0, uint16_t count=0);
      |                          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:216:40: error: 'uint16_t' has not been declared
  216 |   void              fill(uint32_t c=0, uint16_t first=0, uint16_t count=0);
      |                                        ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:216:58: error: 'uint16_t' has not been declared
  216 |   void              fill(uint32_t c=0, uint16_t first=0, uint16_t count=0);
      |                                                          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:217:35: error: 'uint8_t' has not been declared
  217 |   void              setBrightness(uint8_t);
      |                                   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:219:34: error: 'uint16_t' has not been declared
  219 |   void              updateLength(uint16_t n);
      |                                  ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:220:32: error: 'neoPixelType' has not been declared
  220 |   void              updateType(neoPixelType t);
      |                                ^~~~~~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:254:3: error: 'uint8_t' does not name a type
  254 |   uint8_t          *getPixels(void) const { return pixels; };
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:255:3: error: 'uint8_t' does not name a type
  255 |   uint8_t           getBrightness(void) const;
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:260:3: error: 'int16_t' does not name a type
  260 |   int16_t           getPin(void) const { return pin; };
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:265:3: error: 'uint16_t' does not name a type
  265 |   uint16_t          numPixels(void) const { return numLEDs; }
      |   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:266:3: error: 'uint32_t' does not name a type
  266 |   uint32_t          getPixelColor(uint16_t n) const;
      |   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:279:10: error: 'uint8_t' does not name a type
  279 |   static uint8_t    sine8(uint8_t x) {
      |          ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:293:10: error: 'uint8_t' does not name a type
  293 |   static uint8_t    gamma8(uint8_t x) {
      |          ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:307:10: error: 'uint32_t' does not name a type
  307 |   static uint32_t   Color(uint8_t r, uint8_t g, uint8_t b) {
      |          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:322:10: error: 'uint32_t' does not name a type
  322 |   static uint32_t   Color(uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
      |          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:325:10: error: 'uint32_t' does not name a type
  325 |   static uint32_t   ColorHSV(uint16_t hue, uint8_t sat=255, uint8_t val=255);
      |          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:338:10: error: 'uint32_t' does not name a type
  338 |   static uint32_t   gamma32(uint32_t x);
      |          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:346:3: error: 'uint16_t' does not name a type
  346 |   uint16_t          numLEDs;    ///< Number of RGB LEDs in strip
      |   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:347:3: error: 'uint16_t' does not name a type
  347 |   uint16_t          numBytes;   ///< Size of 'pixels' buffer below
      |   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:348:3: error: 'int16_t' does not name a type
  348 |   int16_t           pin;        ///< Output pin number (-1 if not yet set)
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:349:3: error: 'uint8_t' does not name a type
  349 |   uint8_t           brightness; ///< Strip brightness 0-255 (stored as +1)
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:350:3: error: 'uint8_t' does not name a type
  350 |   uint8_t          *pixels;     ///< Holds LED color values (3 or 4 bytes each)
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:351:3: error: 'uint8_t' does not name a type
  351 |   uint8_t           rOffset;    ///< Red index within each 3- or 4-byte pixel
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:352:3: error: 'uint8_t' does not name a type
  352 |   uint8_t           gOffset;    ///< Index of green byte
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:353:3: error: 'uint8_t' does not name a type
  353 |   uint8_t           bOffset;    ///< Index of blue byte
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:354:3: error: 'uint8_t' does not name a type
  354 |   uint8_t           wOffset;    ///< Index of white (==rOffset if no white)
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:355:3: error: 'uint32_t' does not name a type
  355 |   uint32_t          endTime;    ///< Latch timing reference
      |   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h: In member function 'bool Adafruit_NeoPixel::canShow()':
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:235:9: error: 'endTime' was not declared in this scope
  235 |     if (endTime > micros()) {
      |         ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:235:19: error: 'micros' was not declared in this scope
  235 |     if (endTime > micros()) {
      |                   ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:238:13: error: 'micros' was not declared in this scope
  238 |     return (micros() - endTime) >= 300L;
      |             ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:238:24: error: 'endTime' was not declared in this scope
  238 |     return (micros() - endTime) >= 300L;
      |                        ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: At global scope:
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:72:37: error: expected constructor, destructor, or type conversion before '(' 
token
   72 | Adafruit_NeoPixel::Adafruit_NeoPixel(uint16_t n, uint16_t p, neoPixelType t) :
      |                                     ^
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: In constructor 'Adafruit_NeoPixel::Adafruit_NeoPixel()':
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:93:17: error: class 'Adafruit_NeoPixel' does not have any field named 'numLEDs'
   93 |   begun(false), numLEDs(0), numBytes(0), pin(-1), brightness(0), pixels(NULL),
      |                 ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:93:29: error: class 'Adafruit_NeoPixel' does not have any field named 'numBytes'
   93 |   begun(false), numLEDs(0), numBytes(0), pin(-1), brightness(0), pixels(NULL),
      |                             ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:93:42: error: class 'Adafruit_NeoPixel' does not have any field named 'pin'   
   93 |   begun(false), numLEDs(0), numBytes(0), pin(-1), brightness(0), pixels(NULL),
      |                                          ^~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:93:51: error: class 'Adafruit_NeoPixel' does not have any field named 'brightness'
   93 |   begun(false), numLEDs(0), numBytes(0), pin(-1), brightness(0), pixels(NULL),
      |                                                   ^~~~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:93:66: error: class 'Adafruit_NeoPixel' does not have any field named 'pixels'
   93 |   begun(false), numLEDs(0), numBytes(0), pin(-1), brightness(0), pixels(NULL),
      |                                                                  ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:93:73: error: 'NULL' was not declared in this scope
   93 |   begun(false), numLEDs(0), numBytes(0), pin(-1), brightness(0), pixels(NULL),
      |                                                                         ^~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:47:1: note: 'NULL' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
   46 | #include "Adafruit_NeoPixel.h"
  +++ |+#include <cstddef>
   47 |
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:94:3: error: class 'Adafruit_NeoPixel' does not have any field named 'rOffset'
   94 |   rOffset(1), gOffset(0), bOffset(2), wOffset(1), endTime(0) {
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:94:15: error: class 'Adafruit_NeoPixel' does not have any field named 'gOffset'
   94 |   rOffset(1), gOffset(0), bOffset(2), wOffset(1), endTime(0) {
      |               ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:94:27: error: class 'Adafruit_NeoPixel' does not have any field named 'bOffset'
   94 |   rOffset(1), gOffset(0), bOffset(2), wOffset(1), endTime(0) {
      |                           ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:94:39: error: class 'Adafruit_NeoPixel' does not have any field named 'wOffset'
   94 |   rOffset(1), gOffset(0), bOffset(2), wOffset(1), endTime(0) {
      |                                       ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:94:51: error: class 'Adafruit_NeoPixel' does not have any field named 'endTime'
   94 |   rOffset(1), gOffset(0), bOffset(2), wOffset(1), endTime(0) {
      |                                                   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: In destructor 'Adafruit_NeoPixel::~Adafruit_NeoPixel()':
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:101:8: error: 'pixels' was not declared in this scope
  101 |   free(pixels);
      |        ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:101:3: error: 'free' was not declared in this scope
  101 |   free(pixels);
      |   ^~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:47:1: note: 'free' is defined in header '<cstdlib>'; did you forget to '#include <cstdlib>'?
   46 | #include "Adafruit_NeoPixel.h"
  +++ |+#include <cstdlib>
   47 |
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:102:6: error: 'pin' was not declared in this scope
  102 |   if(pin >= 0) pinMode(pin, INPUT);
      |      ^~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:102:29: error: 'INPUT' was not declared in this scope
  102 |   if(pin >= 0) pinMode(pin, INPUT);
      |                             ^~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:102:16: error: 'pinMode' was not declared in this scope
  102 |   if(pin >= 0) pinMode(pin, INPUT);
      |                ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: In member function 'void Adafruit_NeoPixel::begin()':
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:109:6: error: 'pin' was not declared in this scope
  109 |   if(pin >= 0) {
      |      ^~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:110:18: error: 'OUTPUT' was not declared in this scope
  110 |     pinMode(pin, OUTPUT);
      |                  ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:110:5: error: 'pinMode' was not declared in this scope
  110 |     pinMode(pin, OUTPUT);
      |     ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:111:23: error: 'LOW' was not declared in this scope
  111 |     digitalWrite(pin, LOW);
      |                       ^~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:111:5: error: 'digitalWrite' was not declared in this scope
  111 |     digitalWrite(pin, LOW);
      |     ^~~~~~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: At global scope:
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:126:38: error: variable or field 'updateLength' declared void
  126 | void Adafruit_NeoPixel::updateLength(uint16_t n) {
      |                                      ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:126:38: error: 'uint16_t' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:156:36: error: variable or field 'updateType' declared void
  156 | void Adafruit_NeoPixel::updateType(neoPixelType t) {
      |                                    ^~~~~~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:156:36: error: 'neoPixelType' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: In member function 'void Adafruit_NeoPixel::show()':
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:205:7: error: 'pixels' was not declared in this scope
  205 |   if(!pixels) return;
      |       ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:230:3: error: 'noInterrupts' was not declared in this scope
  230 |   noInterrupts(); // Need 100% focus on instruction timing
      |   ^~~~~~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2219:3: error: 'interrupts' was not declared in this scope
 2219 |   interrupts();
      |   ^~~~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2222:3: error: 'endTime' was not declared in this scope
 2222 |   endTime = micros(); // Save EOD time for latch on next call
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2222:13: error: 'micros' was not declared in this scope
 2222 |   endTime = micros(); // Save EOD time for latch on next call
      |             ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: At global scope:
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2230:32: error: variable or field 'setPin' declared void
 2230 | void Adafruit_NeoPixel::setPin(uint16_t p) {
      |                                ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2230:32: error: 'uint16_t' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2256:2: error: variable or field 'setPixelColor' declared void
 2256 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b) {
      |  ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2256:2: error: 'uint16_t' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2256:14: error: 'uint8_t' was not declared in this scope
 2256 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b) {
      |              ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2256:25: error: 'uint8_t' was not declared in this scope
 2256 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b) {
      |                         ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2256:36: error: 'uint8_t' was not declared in this scope
 2256 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b) {
      |                                    ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2288:2: error: variable or field 'setPixelColor' declared void
 2288 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
      |  ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2288:2: error: 'uint16_t' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2288:14: error: 'uint8_t' was not declared in this scope
 2288 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
      |              ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2288:25: error: 'uint8_t' was not declared in this scope
 2288 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
      |                         ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2288:36: error: 'uint8_t' was not declared in this scope
 2288 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
      |                                    ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2288:47: error: 'uint8_t' was not declared in this scope
 2288 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
      |                                               ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2317:39: error: variable or field 'setPixelColor' declared void
 2317 | void Adafruit_NeoPixel::setPixelColor(uint16_t n, uint32_t c) {
      |                                       ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2317:39: error: 'uint16_t' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2317:51: error: 'uint32_t' was not declared in this scope
 2317 | void Adafruit_NeoPixel::setPixelColor(uint16_t n, uint32_t c) {
      |                                                   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2352:30: error: variable or field 'fill' declared void
 2352 | void Adafruit_NeoPixel::fill(uint32_t c, uint16_t first, uint16_t count) {
      |                              ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2352:30: error: 'uint32_t' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2352:42: error: 'uint16_t' was not declared in this scope
 2352 | void Adafruit_NeoPixel::fill(uint32_t c, uint16_t first, uint16_t count) {
      |                                          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2352:58: error: 'uint16_t' was not declared in this scope
 2352 | void Adafruit_NeoPixel::fill(uint32_t c, uint16_t first, uint16_t count) {
      |                                                          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2397:1: error: 'uint32_t' does not name a type
 2397 | uint32_t Adafruit_NeoPixel::ColorHSV(uint16_t hue, uint8_t sat, uint8_t val) {
      | ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2484:1: error: 'uint32_t' does not name a type
 2484 | uint32_t Adafruit_NeoPixel::getPixelColor(uint16_t n) const {
      | ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2538:39: error: variable or field 'setBrightness' declared void
 2538 | void Adafruit_NeoPixel::setBrightness(uint8_t b) {
      |                                       ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2538:39: error: 'uint8_t' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2576:1: error: 'uint8_t' does not name a type
 2576 | uint8_t Adafruit_NeoPixel::getBrightness(void) const {
      | ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: In member function 'void Adafruit_NeoPixel::clear()':
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2584:10: error: 'pixels' was not declared in this scope
 2584 |   memset(pixels, 0, numBytes);
      |          ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2584:21: error: 'numBytes' was not declared in this scope
 2584 |   memset(pixels, 0, numBytes);
      |                     ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2584:3: error: 'memset' was not declared in this scope
 2584 |   memset(pixels, 0, numBytes);
      |   ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:47:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
   46 | #include "Adafruit_NeoPixel.h"
  +++ |+#include <cstring>
   47 |
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: At global scope:
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2589:1: error: 'uint32_t' does not name a type
 2589 | uint32_t Adafruit_NeoPixel::gamma32(uint32_t x) {
      | ^~~~~~~~
make[3]: *** [../build/module.mk:286: ../build/target/user/platform-6-m/LED2/Adafruit_NeoPixel/src/Adafruit_NeoPixel.o] Error 1
make[2]: *** [../../../build/recurse.mk:12: user] Error 2
make[1]: *** [../build/recurse.mk:12: modules/photon/user-part] Error 2
make: *** [C:\Users\micro\.particle\toolchains\buildscripts\1.9.2\Makefile:54: compile-user] Error 2
The terminal process "C:\Users\micro\.particle\toolchains\buildtools\1.1.1\bin\bash.exe '-c', 'make -f 'C:\Users\micro\.particle\toolchains\buildscripts\1.9.2\Makefile' compile-user -s'" terminated with exit code: 2.
  1. Is this because these libraries are not written for Particle?

  2. Is this just a matter of modifying naming conventions? If so, I could port them and submit for the community.

  3. Is there a better way to find updated code for this?

Thanks!

OK, digging a little deeper and comparing the new Adafruit_neopixel to the port from the CLI, it’s clear that the header file is different, and that Particle.h is included in the library- leading me to believe that there are some deep modifications to the stock library to make it work for particle.

I may spend some time digging in and learning how to do the port.

If anyone knows of someone who has already done the port, please let me know!

Most of the errors you quoted above will go away as soon you add #include <Particle.h>.
After that you can post the remaining errors and we can see what’s still missing.

1 Like

So… just wondering… why do I need that in this new project, but not my old project… both created with the CLI command?

I don’t know enough about your old project to answer that.
But since you said you pulled the latest version of Adafruit_NeoPixel/Adafruit_NeoMatrix libraries from GitHub I suppose you didn’t have that in your old project and that may be the reason :wink:

ha, OK, good point…

So here’s the thing… I have not had to include the #include <Particle.h> in any of my recent projects. And it’s not there in the Web IDE either, where is where I copied my first couple VSCode projects when I made the switch. So I assumed it was added by the Web compiler and the Particle toolchain added by the Particle extension.

Also, my main .ino source file is able to use uint8_t (etc) declarations. But it seems like they are rejected by the Adafruit library upon compile. Which doesn’t make sense to me…why would it work in the main file, not the library, and why would someone release a library that wasn’t designed for Particle but that doesn’t work without something in the Particle include?

Anyway, my code gets the same error after the Particle.h include…

Code:

/*
 * Project LED2
 * Description:
 * Author:
 * Date:
 */

#include <Particle.h>
#include <Adafruit_GFX_RK.h>
#include <JsonParserGeneratorRK.h>
#include <Adafruit_NeoMatrix.h>
#include <Adafruit_NeoPixel.h>

uint8_t hello=0;
uint32_t world=1;

// setup() runs once, when the device is first turned on.
void setup() {

  hello=world;
  // Put initialization like pinMode and begin functions here.

}

// loop() runs over and over again, as quickly as it can execute.
void loop() {
  // The core of your code will likely live here.

}

Local Compile Output:

> Executing task: make -f 'C:\Users\micro\.particle\toolchains\buildscripts\1.9.2\Makefile' compile-user -s <


:::: COMPILING APPLICATION

In file included from c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:46:
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:136:9: error: 'uint16_t' does not name a type
  136 | typedef uint16_t neoPixelType; ///< 3rd arg to Adafruit_NeoPixel constructor
      |         ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:152:14: error: 'uint8_t' does not name a type
  152 | static const uint8_t PROGMEM _NeoPixelSineTable[256] = {
      |              ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:178:14: error: 'uint8_t' does not name a type
  178 | static const uint8_t PROGMEM _NeoPixelGammaTable[256] = {
      |              ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:205:29: error: expected ')' before 'n'
  205 |   Adafruit_NeoPixel(uint16_t n, uint16_t pin=6,
      |                    ~        ^~
      |                             )
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:212:28: error: 'uint16_t' has not been declared
  212 |   void              setPin(uint16_t p);
      |                            ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:213:35: error: 'uint16_t' has not been declared
  213 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b);
      |                                   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:213:47: error: 'uint8_t' has not been declared
  213 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b);
      |                                               ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:213:58: error: 'uint8_t' has not been declared
  213 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b);
      |                                                          ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:213:69: error: 'uint8_t' has not been declared
  213 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b);
      |                                                                     ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:214:35: error: 'uint16_t' has not been declared
  214 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b,
      |                                   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:214:47: error: 'uint8_t' has not been declared
  214 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b,
      |                                               ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:214:58: error: 'uint8_t' has not been declared
  214 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b,
      |                                                          ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:214:69: error: 'uint8_t' has not been declared
  214 |   void              setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b,
      |                                                                     ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:215:23: error: 'uint8_t' has not been declared
  215 |                       uint8_t w);
      |                       ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:216:35: error: 'uint16_t' has not been declared
  216 |   void              setPixelColor(uint16_t n, uint32_t c);
      |                                   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:216:47: error: 'uint32_t' has not been declared
  216 |   void              setPixelColor(uint16_t n, uint32_t c);
      |                                               ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:217:26: error: 'uint32_t' has not been declared
  217 |   void              fill(uint32_t c=0, uint16_t first=0, uint16_t count=0);
      |                          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:217:40: error: 'uint16_t' has not been declared
  217 |   void              fill(uint32_t c=0, uint16_t first=0, uint16_t count=0);
      |                                        ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:217:58: error: 'uint16_t' has not been declared
  217 |   void              fill(uint32_t c=0, uint16_t first=0, uint16_t count=0);
      |                                                          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:218:35: error: 'uint8_t' has not been declared
  218 |   void              setBrightness(uint8_t);
      |                                   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:220:34: error: 'uint16_t' has not been declared
  220 |   void              updateLength(uint16_t n);
      |                                  ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:221:32: error: 'neoPixelType' has not been declared
  221 |   void              updateType(neoPixelType t);
      |                                ^~~~~~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:255:3: error: 'uint8_t' does not name a type
  255 |   uint8_t          *getPixels(void) const { return pixels; };
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:256:3: error: 'uint8_t' does not name a type
  256 |   uint8_t           getBrightness(void) const;
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:261:3: error: 'int16_t' does not name a type
  261 |   int16_t           getPin(void) const { return pin; };
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:266:3: error: 'uint16_t' does not name a type
  266 |   uint16_t          numPixels(void) const { return numLEDs; }
      |   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:267:3: error: 'uint32_t' does not name a type
  267 |   uint32_t          getPixelColor(uint16_t n) const;
      |   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:280:10: error: 'uint8_t' does not name a type
  280 |   static uint8_t    sine8(uint8_t x) {
      |          ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:294:10: error: 'uint8_t' does not name a type
  294 |   static uint8_t    gamma8(uint8_t x) {
      |          ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:308:10: error: 'uint32_t' does not name a type
  308 |   static uint32_t   Color(uint8_t r, uint8_t g, uint8_t b) {
      |          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:323:10: error: 'uint32_t' does not name a type
  323 |   static uint32_t   Color(uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
      |          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:326:10: error: 'uint32_t' does not name a type
  326 |   static uint32_t   ColorHSV(uint16_t hue, uint8_t sat=255, uint8_t val=255);
      |          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:339:10: error: 'uint32_t' does not name a type
  339 |   static uint32_t   gamma32(uint32_t x);
      |          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:347:3: error: 'uint16_t' does not name a type
  347 |   uint16_t          numLEDs;    ///< Number of RGB LEDs in strip
      |   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:348:3: error: 'uint16_t' does not name a type
  348 |   uint16_t          numBytes;   ///< Size of 'pixels' buffer below
      |   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:349:3: error: 'int16_t' does not name a type
  349 |   int16_t           pin;        ///< Output pin number (-1 if not yet set)
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:350:3: error: 'uint8_t' does not name a type
  350 |   uint8_t           brightness; ///< Strip brightness 0-255 (stored as +1)
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:351:3: error: 'uint8_t' does not name a type
  351 |   uint8_t          *pixels;     ///< Holds LED color values (3 or 4 bytes each)
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:352:3: error: 'uint8_t' does not name a type
  352 |   uint8_t           rOffset;    ///< Red index within each 3- or 4-byte pixel
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:353:3: error: 'uint8_t' does not name a type
  353 |   uint8_t           gOffset;    ///< Index of green byte
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:354:3: error: 'uint8_t' does not name a type
  354 |   uint8_t           bOffset;    ///< Index of blue byte
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:355:3: error: 'uint8_t' does not name a type
  355 |   uint8_t           wOffset;    ///< Index of white (==rOffset if no white)
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:356:3: error: 'uint32_t' does not name a type
  356 |   uint32_t          endTime;    ///< Latch timing reference
      |   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h: In member function 'bool Adafruit_NeoPixel::canShow()':
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:236:9: error: 'endTime' was not declared in this scope
  236 |     if (endTime > micros()) {
      |         ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:236:19: error: 'micros' was not declared in this scope
  236 |     if (endTime > micros()) {
      |                   ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:239:13: error: 'micros' was not declared in this scope
  239 |     return (micros() - endTime) >= 300L;
      |             ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.h:239:24: error: 'endTime' was not declared in this scope
  239 |     return (micros() - endTime) >= 300L;
      |                        ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: At global scope:
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:72:37: error: expected constructor, destructor, or type conversion before '(' 
token
   72 | Adafruit_NeoPixel::Adafruit_NeoPixel(uint16_t n, uint16_t p, neoPixelType t) :
      |                                     ^
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: In constructor 'Adafruit_NeoPixel::Adafruit_NeoPixel()':
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:93:17: error: class 'Adafruit_NeoPixel' does not have any field named 'numLEDs'
   93 |   begun(false), numLEDs(0), numBytes(0), pin(-1), brightness(0), pixels(NULL),
      |                 ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:93:29: error: class 'Adafruit_NeoPixel' does not have any field named 'numBytes'
   93 |   begun(false), numLEDs(0), numBytes(0), pin(-1), brightness(0), pixels(NULL),
      |                             ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:93:42: error: class 'Adafruit_NeoPixel' does not have any field named 'pin'   
   93 |   begun(false), numLEDs(0), numBytes(0), pin(-1), brightness(0), pixels(NULL),
      |                                          ^~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:93:51: error: class 'Adafruit_NeoPixel' does not have any field named 'brightness'
   93 |   begun(false), numLEDs(0), numBytes(0), pin(-1), brightness(0), pixels(NULL),
      |                                                   ^~~~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:93:66: error: class 'Adafruit_NeoPixel' does not have any field named 'pixels'
   93 |   begun(false), numLEDs(0), numBytes(0), pin(-1), brightness(0), pixels(NULL),
      |                                                                  ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:93:73: error: 'NULL' was not declared in this scope
   93 |   begun(false), numLEDs(0), numBytes(0), pin(-1), brightness(0), pixels(NULL),
      |                                                                         ^~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:47:1: note: 'NULL' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
   46 | #include "Adafruit_NeoPixel.h"
  +++ |+#include <cstddef>
   47 |
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:94:3: error: class 'Adafruit_NeoPixel' does not have any field named 'rOffset'
   94 |   rOffset(1), gOffset(0), bOffset(2), wOffset(1), endTime(0) {
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:94:15: error: class 'Adafruit_NeoPixel' does not have any field named 'gOffset'
   94 |   rOffset(1), gOffset(0), bOffset(2), wOffset(1), endTime(0) {
      |               ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:94:27: error: class 'Adafruit_NeoPixel' does not have any field named 'bOffset'
   94 |   rOffset(1), gOffset(0), bOffset(2), wOffset(1), endTime(0) {
      |                           ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:94:39: error: class 'Adafruit_NeoPixel' does not have any field named 'wOffset'
   94 |   rOffset(1), gOffset(0), bOffset(2), wOffset(1), endTime(0) {
      |                                       ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:94:51: error: class 'Adafruit_NeoPixel' does not have any field named 'endTime'
   94 |   rOffset(1), gOffset(0), bOffset(2), wOffset(1), endTime(0) {
      |                                                   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: In destructor 'Adafruit_NeoPixel::~Adafruit_NeoPixel()':
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:101:8: error: 'pixels' was not declared in this scope
  101 |   free(pixels);
      |        ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:101:3: error: 'free' was not declared in this scope
  101 |   free(pixels);
      |   ^~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:47:1: note: 'free' is defined in header '<cstdlib>'; did you forget to '#include <cstdlib>'?
   46 | #include "Adafruit_NeoPixel.h"
  +++ |+#include <cstdlib>
   47 |
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:102:6: error: 'pin' was not declared in this scope
  102 |   if(pin >= 0) pinMode(pin, INPUT);
      |      ^~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:102:29: error: 'INPUT' was not declared in this scope
  102 |   if(pin >= 0) pinMode(pin, INPUT);
      |                             ^~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:102:16: error: 'pinMode' was not declared in this scope
  102 |   if(pin >= 0) pinMode(pin, INPUT);
      |                ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: In member function 'void Adafruit_NeoPixel::begin()':
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:109:6: error: 'pin' was not declared in this scope
  109 |   if(pin >= 0) {
      |      ^~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:110:18: error: 'OUTPUT' was not declared in this scope
  110 |     pinMode(pin, OUTPUT);
      |                  ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:110:5: error: 'pinMode' was not declared in this scope
  110 |     pinMode(pin, OUTPUT);
      |     ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:111:23: error: 'LOW' was not declared in this scope
  111 |     digitalWrite(pin, LOW);
      |                       ^~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:111:5: error: 'digitalWrite' was not declared in this scope
  111 |     digitalWrite(pin, LOW);
      |     ^~~~~~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: At global scope:
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:126:38: error: variable or field 'updateLength' declared void
  126 | void Adafruit_NeoPixel::updateLength(uint16_t n) {
      |                                      ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:126:38: error: 'uint16_t' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:156:36: error: variable or field 'updateType' declared void
  156 | void Adafruit_NeoPixel::updateType(neoPixelType t) {
      |                                    ^~~~~~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:156:36: error: 'neoPixelType' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: In member function 'void Adafruit_NeoPixel::show()':
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:205:7: error: 'pixels' was not declared in this scope
  205 |   if(!pixels) return;
      |       ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:230:3: error: 'noInterrupts' was not declared in this scope
  230 |   noInterrupts(); // Need 100% focus on instruction timing
      |   ^~~~~~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2219:3: error: 'interrupts' was not declared in this scope
 2219 |   interrupts();
      |   ^~~~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2222:3: error: 'endTime' was not declared in this scope
 2222 |   endTime = micros(); // Save EOD time for latch on next call
      |   ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2222:13: error: 'micros' was not declared in this scope
 2222 |   endTime = micros(); // Save EOD time for latch on next call
      |             ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: At global scope:
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2230:32: error: variable or field 'setPin' declared void
 2230 | void Adafruit_NeoPixel::setPin(uint16_t p) {
      |                                ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2230:32: error: 'uint16_t' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2256:2: error: variable or field 'setPixelColor' declared void
 2256 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b) {
      |  ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2256:2: error: 'uint16_t' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2256:14: error: 'uint8_t' was not declared in this scope
 2256 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b) {
      |              ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2256:25: error: 'uint8_t' was not declared in this scope
 2256 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b) {
      |                         ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2256:36: error: 'uint8_t' was not declared in this scope
 2256 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b) {
      |                                    ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2288:2: error: variable or field 'setPixelColor' declared void
 2288 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
      |  ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2288:2: error: 'uint16_t' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2288:14: error: 'uint8_t' was not declared in this scope
 2288 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
      |              ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2288:25: error: 'uint8_t' was not declared in this scope
 2288 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
      |                         ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2288:36: error: 'uint8_t' was not declared in this scope
 2288 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
      |                                    ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2288:47: error: 'uint8_t' was not declared in this scope
 2288 |  uint16_t n, uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
      |                                               ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2317:39: error: variable or field 'setPixelColor' declared void
 2317 | void Adafruit_NeoPixel::setPixelColor(uint16_t n, uint32_t c) {
      |                                       ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2317:39: error: 'uint16_t' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2317:51: error: 'uint32_t' was not declared in this scope
 2317 | void Adafruit_NeoPixel::setPixelColor(uint16_t n, uint32_t c) {
      |                                                   ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2352:30: error: variable or field 'fill' declared void
 2352 | void Adafruit_NeoPixel::fill(uint32_t c, uint16_t first, uint16_t count) {
      |                              ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2352:30: error: 'uint32_t' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2352:42: error: 'uint16_t' was not declared in this scope
 2352 | void Adafruit_NeoPixel::fill(uint32_t c, uint16_t first, uint16_t count) {
      |                                          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2352:58: error: 'uint16_t' was not declared in this scope
 2352 | void Adafruit_NeoPixel::fill(uint32_t c, uint16_t first, uint16_t count) {
      |                                                          ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2397:1: error: 'uint32_t' does not name a type
 2397 | uint32_t Adafruit_NeoPixel::ColorHSV(uint16_t hue, uint8_t sat, uint8_t val) {
      | ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2484:1: error: 'uint32_t' does not name a type
 2484 | uint32_t Adafruit_NeoPixel::getPixelColor(uint16_t n) const {
      | ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2538:39: error: variable or field 'setBrightness' declared void
 2538 | void Adafruit_NeoPixel::setBrightness(uint8_t b) {
      |                                       ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2538:39: error: 'uint8_t' was not declared in this scope
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2576:1: error: 'uint8_t' does not name a type
 2576 | uint8_t Adafruit_NeoPixel::getBrightness(void) const {
      | ^~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: In member function 'void Adafruit_NeoPixel::clear()':
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2584:10: error: 'pixels' was not declared in this scope
 2584 |   memset(pixels, 0, numBytes);
      |          ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2584:21: error: 'numBytes' was not declared in this scope
 2584 |   memset(pixels, 0, numBytes);
      |                     ^~~~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2584:3: error: 'memset' was not declared in this scope
 2584 |   memset(pixels, 0, numBytes);
      |   ^~~~~~
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:47:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
   46 | #include "Adafruit_NeoPixel.h"
  +++ |+#include <cstring>
   47 |
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp: At global scope:
c:/Users/micro/code/LED2/lib/Adafruit_NeoPixel/src/Adafruit_NeoPixel.cpp:2589:1: error: 'uint32_t' does not name a type
 2589 | uint32_t Adafruit_NeoPixel::gamma32(uint32_t x) {
      | ^~~~~~~~
make[3]: *** [../build/module.mk:286: ../build/target/user/platform-6-m/LED2/Adafruit_NeoPixel/src/Adafruit_NeoPixel.o] Error 1
make[2]: *** [../../../build/recurse.mk:12: user] Error 2
make[1]: *** [../build/recurse.mk:12: modules/photon/user-part] Error 2
make: *** [C:\Users\micro\.particle\toolchains\buildscripts\1.9.2\Makefile:54: compile-user] Error 2
The terminal process "C:\Users\micro\.particle\toolchains\buildtools\1.1.1\bin\bash.exe '-c', 'make -f 'C:\Users\micro\.particle\toolchains\buildscripts\1.9.2\Makefile' compile-user -s'" terminated with exit code: 2.

Press any key to close the terminal.

Have you added that include inside the library sources?

The thing with .ino files is that that they will be pre-processed by the build environment and when that include is missing it will be added for you. However, only the main file of your project can be an .ino file, hence all other files need to have that header included manually (directly or indirectly via another header).

Since C/C++ modules (e.g. .cpp files) are compiled individually it is not enough when one module features a particular header file as any other module would not know about that before the linker run - so each and every module needs to have its own include statement.
When you look at the implementation of other ported libraries you will most likely find a #include <Particle.h> for that exact reason.

Adafruit is not releasing libraries for Particle, they have a set of target platforms and Particle is not one of them (yet) - hence Particle has its own repository of libraries that were ported by them or some volunteer who did the porting and contributed the library to their repo.

I did add the particle include in the sources, though I will try again since you think that is where the problem might be- maybe I messed something up.

I definitely don’t understand how the compiler works… I see a generated .cpp file that’s basically my .ino with a few added lines… including the Particle include.

My last question though, I think it was interpreted incorrectly…

Why is the Adafruit Library relying on Particle.h for all those uint32_t declarations?

The library would “normally” use Arduino.h (or a similar one for other platforms) which would provide the definition of these types but due to the compiler directives that doesn’t get pulled in either, so these definitions are missing.

1 Like

Thank you, that makes perfect sense.

I really need to stop stepping away from C++ programming for 6mo at a time.

OK, I added the particle header to those lib headers, and most of the errors went away. I am 100% sure I tried that already, but I suppose I may be more susceptible to the fumes from the neighbor’s roofing work than I thought.

I am gonna try to port those newer versions over, and if I get them working I will post them to the forums for comments and others to use.

Thanks!

1 Like

Well… I thought I got it to compile… but once I started getting errors and dug into the code… it’s a lot that’s beyond me. I may continue to see if I can port it over, but there’s a lot more code in the new Adafruit version that is different from the old port, and there are a lot of low-level instructions that I have no idea how to implement for new functions.

All of this was to get the latest version of the JsonParserGeneratorRK library to work… because the older version doesn’t seem to handle values with spaces well (and I need spaces). I can make my project work with the SparkJson library, though it’s not as nice to use.

Thank you all for your help. If I do figure out how to port it over, I’ll be sure to post it.

Most the logic should be there already as the library supports STM32 (Particle Gen2) and nRF52 (Particle Gen3) controllers.
So it’s probably mainly a thing of making sure the correct conditional compile (#if defined()) branches are selected.