[ISSUE] Including the neopixel library - cannot find

If I go to “Particle: Install Library”, type neopixel it adds the library to my lib folder, however this shows the following error in my workspace:

Import line:

#include "neopixel/neopixel.h";

Error:

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (/Users/nickjonas/Projects/raincheck/src/raincheck.ino).C/C++(1696)

cannot open source file "neopixel/neopixel.h"C/C++(1696)

It however will work with the dotstar library:

#include "dotstar/dotstar.h";

Do I need to update my includePath as the error says, and how do I go about doing that?

Here is the output of an Audit Environment:

{
    "username": "xxx@gmail.com",
    "workspace": {
        "name": "raincheck",
        "isWorkspace": false,
        "folders": [
            {
                "location": "/Users/nickjonas/Projects/raincheck",
                "hasValidPath": true,
                "settings": {
                    "firmwareName": "deviceOS",
                    "firmwareVersion": "1.0.1",
                    "targetDevice": "Raincheck",
                    "targetPlatform": "photon",
                    "compileButtonAction": "localAppDeviceOS",
                    "flashButtonAction": "localAppDeviceOS",
                    "disableWelcomeScreen": false,
                    "disableLocalCompilerDirtyCheck": false,
                    "enableVerboseLocalCompilerLogging": false
                },
                "files": [
                    ".vscode",
                    ".vscode/launch.json",
                    ".vscode/settings.json",
                    "README.md",
                    "lib",
                    "lib/dotstar",
                    "lib/neopixel",
                    "photon_firmware_1567988490450.bin",
                    "photon_firmware_1567989389602.bin",
                    "photon_firmware_1568031316178.bin",
                    "project.properties",
                    "src",
                    "src/raincheck.ino",
                    "target",
                    "target/obj",
                    "target/raincheck.map"
                ]
            }
        ]
    },
    "cli": {
        "binpath": "/Users/nickjonas/.vscode/extensions/particle.particle-vscode-core-1.5.3/src/cli/bin/darwin/amd64/particle",
        "ok": true,
        "version": "1.46.2",
        "installed": 1567987124355
    },
    "localCompiler": {
        "ok": true,
        "dependencies": [
            {
                "id": "deviceOS@1.0.1",
                "ok": true
            },
            {
                "id": "gcc-arm@5.3.1",
                "ok": true
            },
            {
                "id": "buildtools@1.1.0",
                "ok": true
            },
            {
                "id": "buildscripts@1.6.1",
                "ok": true
            },
            {
                "id": "openocd@0.11.1-adhoc6ea4372.0",
                "ok": true
            }
        ]
    },
    "platform": {
        "os": "darwin",
        "type": "Darwin",
        "release": "18.5.0",
        "arch": "x64",
        "path": {
            "key": "PATH",
            "value": "/Users/nickjonas/google-cloud-sdk/bin:/Users/nickjonas/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
        },
        "homeDir": "/Users/nickjonas",
        "particleDir": "/Users/nickjonas/.particle",
        "localCompilerToolchainDir": "/Users/nickjonas/.particle/toolchains"
    },
    "env": {
        "TMPDIR": "/var/folders/qf/3_5db5454wl5y_nvk_z7l0f40000gn/T/",
        "__CF_USER_TEXT_ENCODING": "0x1F5:0x0:0x0",
        "SHELL": "/bin/bash",
        "HOME": "/Users/nickjonas",
        "SSH_AUTH_SOCK": "/private/tmp/com.apple.launchd.ViwmMkXTzi/Listeners",
        "Apple_PubSub_Socket_Render": "/private/tmp/com.apple.launchd.xK2gmzBFEM/Render",
        "LOGNAME": "nickjonas",
        "PATH": "/Users/nickjonas/google-cloud-sdk/bin:/Users/nickjonas/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
        "XPC_SERVICE_NAME": "com.apple.xpc.launchd.oneshot.0x10000001.Electron",
        "COMMAND_MODE": "unix2003",
        "USER": "nickjonas",
        "SECURITYSESSIONID": "186a8",
        "XPC_FLAGS": "0x0",
        "VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
        "VSCODE_NODE_CACHED_DATA_DIR": "/Users/nickjonas/Library/Application Support/Code/CachedData/3db7e09f3b61f915d03bbfa58e258d6eee843f35",
        "VSCODE_LOGS": "/Users/nickjonas/Library/Application Support/Code/logs/20190908T232117",
        "VSCODE_IPC_HOOK": "/Users/nickjonas/Library/Application Support/Code/1.38.0-main.sock",
        "VSCODE_PID": "512",
        "EDITOR": "vim",
        "GPG_TTY": "not a tty",
        "HISTCONTROL": "ignoreboth",
        "HISTFILESIZE": "32768",
        "HISTSIZE": "32768",
        "LANG": "en_US.UTF-8",
        "LC_ALL": "en_US.UTF-8",
        "LESS_TERMCAP_md": "\u001b[38;5;136m",
        "LSCOLORS": "BxBxhxDxfxhxhxhxhxcxcx",
        "MANPAGER": "less -X",
        "NODE_REPL_HISTORY": "/Users/nickjonas/.node_history",
        "NODE_REPL_HISTORY_SIZE": "32768",
        "NODE_REPL_MODE": "sloppy",
        "PS1": "\\[\\033]0;\\W\\007\\]\\[\u001b[1m\\]\\n\\[\u001b[38;5;166m\\]\\u\\[\u001b[97m\\] at \\[\u001b[38;5;136m\\]\\h\\[\u001b[97m\\] in \\[\u001b[38;5;64m\\]\\w$(prompt_git \"\\[\u001b[97m\\] on \\[\u001b[38;5;61m\\]\" \"\\[\u001b[38;5;33m\\]\")\\n\\[\u001b[97m\\]$ \\[\u001b(B\u001b[m\\]",
        "PS2": "\\[\u001b[38;5;136m\\]→ \\[\u001b(B\u001b[m\\]",
        "PWD": "/",
        "PYTHONIOENCODING": "UTF-8",
        "SHLVL": "1",
        "TERM": "xterm-256color",
        "_": "/Applications/Visual Studio Code.app/Contents/MacOS/Electron",
        "AMD_ENTRYPOINT": "vs/workbench/services/extensions/node/extensionHostProcess",
        "PIPE_LOGGING": "true",
        "VERBOSE_LOGGING": "true",
        "VSCODE_IPC_HOOK_EXTHOST": "/var/folders/qf/3_5db5454wl5y_nvk_z7l0f40000gn/T/vscode-ipc-174d1a7a-23de-41de-b4a8-e045e5ff155f.sock",
        "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
        "VSCODE_LOG_STACK": "false",
        "VSCODE_PREVENT_FOREIGN_INSPECT": "true",
        "ELECTRON_RUN_AS_NODE": "1",
        "APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true"
    },
    "versions": {
        "http_parser": "2.8.0",
        "node": "10.11.0",
        "v8": "6.9.427.31-electron.0",
        "uv": "1.23.0",
        "zlib": "1.2.11",
        "ares": "1.14.0",
        "modules": "69",
        "nghttp2": "1.33.0",
        "napi": "3",
        "openssl": "1.1.0",
        "icu": "62.2",
        "unicode": "11.0",
        "cldr": "33.1",
        "tz": "2019a"
    },
    "vscode": {
        "appName": "Visual Studio Code",
        "appRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
        "machineId": "5d462ec3763a5d2ce4536ea9d8bd89ee05ed437efdca647c3989c0a8881c94e4",
        "sessionId": "b6506938-b703-446c-a82a-3fa814f66af71567999283675",
        "version": "1.38.0"
    },
    "extensions": [
        {
            "id": "ms-vscode.node-debug",
            "version": "1.38.4"
        },
        {
            "id": "ms-vscode.node-debug2",
            "version": "1.33.0"
        },
        {
            "id": "ms-vscode.references-view",
            "version": "0.0.30"
        },
        {
            "id": "dkundel.vscode-new-file",
            "version": "4.0.2"
        },
        {
            "id": "infeng.vscode-react-typescript",
            "version": "1.3.1"
        },
        {
            "id": "marus25.cortex-debug",
            "version": "0.3.1"
        },
        {
            "id": "ms-vscode.cpptools",
            "version": "0.25.1"
        },
        {
            "id": "ms-vscode.sublime-keybindings",
            "version": "4.0.3"
        },
        {
            "id": "particle.particle-vscode-core",
            "version": "1.5.3"
        },
        {
            "id": "particle.particle-vscode-pack",
            "version": "1.5.3"
        },
        {
            "id": "particle.particle-vscode-snippets",
            "version": "1.5.3"
        },
        {
            "id": "particle.particle-vscode-theme",
            "version": "1.5.3"
        },
        {
            "id": "Tyriar.shell-launcher",
            "version": "0.3.0"
        }
    ]
}

:thinking: hm. that seems to work for me here though i realize that’s not super-helpful :hugs:

unfortunately, intellisense can be a bit finicky. here are a couple of things you could try:

  1. run a local compilation task: Particle: Compile application (local) was what i ran - it should compile successfully
  2. close your .ino file and any other source code files
  3. run the C/C++: Reset Intellisense Database command
  4. re-open your .ino file - is the issue fixed? if not…
  5. try adding "C_Cpp.loggingLevel": "Debug" to your project’s ./vscode/settings.json file (or use VSCode’s UI - File > Preferences > Settings then search for “logging level”)
  6. with logging level set to “Debug”, select the “C/C++” entry in the Output panel’s drop-down menu (top-right next to the panel’s “close” button), close and re-open your .ino file, and share the log it produces.

lastly, if you can share your source code or a minimal version that reproduces the issue that’d also be helpful :+1:

For quite some time now, there is no need for prepending the path to the header file name.
Just use #include "neopixel.h".

Thanks both!

So it’s moved past that, will compile locally, but now I get this error on a cloud compile which I really don’t know how to further diagnose:

Compiling code for photon
Targeting version: 1.0.1

Including:
    lib/dotstar/src/dotstar.h
    lib/dotstar/src/dotstar/dotstar.h
    lib/neopixel/src/neopixel.h
    lib/neopixel/src/neopixel/neopixel.h
    src/raincheck.ino
    lib/dotstar/examples/1-strandtest/1-strandtest.cpp
    lib/dotstar/src/dotstar.cpp
    lib/neopixel/examples/a-rainbow/a-rainbow.cpp
    lib/neopixel/examples/extra-examples/extra-examples.cpp
    lib/neopixel/examples/rgbw-strandtest/rgbw-strandtest.cpp
    lib/neopixel/src/neopixel.cpp
    src/raincheck.cpp
    project.properties
attempting to compile firmware 

Processing  src/raincheck.ino
Checking library dotstar...
Checking library neopixel...
Installing library neopixel 1.0.0 to lib/neopixel ...
Installing library dotstar 0.0.5 to lib/dotstar ...
Library neopixel 1.0.0 installed.
Library dotstar 0.0.5 installed.
make -C ../modules/photon/user-part all
make[1]: Entering directory '/firmware/modules/photon/user-part'
make -C ../../../user 
make[2]: Entering directory '/firmware/user'
Building cpp file: src/raincheck.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-6-msrc/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=6 -DPLATFORM_NAME=photon -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD006 -DUSBD_PID_CDC=0xC006 -DSPARK_PLATFORM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=6 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=1.0.1 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../services/nanopb -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/photon -I../hal/src/stm32f2xx -I../hal/src/stm32 -I../hal/src/photon/api -I../hal/src/photon/include -I../hal/src/photon/wiced/security/BESL/host/WICED/ -I../hal/src/photon/wiced/security/BESL/include -I../hal/src/photon/wiced/security/BESL -I../hal/src/photon/wiced/security/BESL/crypto -I../hal/src/photon/wiced/WWD/include/ -I../hal/src/photon/wiced/platform/include/ -I../hal/src/photon/wiced/platform/GCC/ -I../hal/src/photon/wiced/security/BESL/supplicant/ -I../hal/src/photon/libraries/crypto -I../platform/shared/inc -I../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F2xx/CMSIS/Include -I../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../dynalib/inc -Isrc -I./libraries -Ilib/dotstar/src -Ilib/neopixel/src -I. -MD -MP -MF ../build/target/user/platform-6-msrc/raincheck.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DBOOTLOADER_SDK_3_3_0_PARTICLE -DPARTICLE_DCT_COMPATIBILITY -DSPARK_PLATFORM_NET=BCM9WCDUSI09 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x80A0000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=5 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,1002 -DMODULE_DEPENDENCY2=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-6-msrc/raincheck.o src/raincheck.cpp

Building cpp file: lib/dotstar/src/dotstar.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-6-mdotstar/src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=6 -DPLATFORM_NAME=photon -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD006 -DUSBD_PID_CDC=0xC006 -DSPARK_PLATFORM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=6 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=1.0.1 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../services/nanopb -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/photon -I../hal/src/stm32f2xx -I../hal/src/stm32 -I../hal/src/photon/api -I../hal/src/photon/include -I../hal/src/photon/wiced/security/BESL/host/WICED/ -I../hal/src/photon/wiced/security/BESL/include -I../hal/src/photon/wiced/security/BESL -I../hal/src/photon/wiced/security/BESL/crypto -I../hal/src/photon/wiced/WWD/include/ -I../hal/src/photon/wiced/platform/include/ -I../hal/src/photon/wiced/platform/GCC/ -I../hal/src/photon/wiced/security/BESL/supplicant/ -I../hal/src/photon/libraries/crypto -I../platform/shared/inc -I../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F2xx/CMSIS/Include -I../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../dynalib/inc -Isrc -I./libraries -Ilib/dotstar/src -Ilib/neopixel/src -I. -MD -MP -MF ../build/target/user/platform-6-mdotstar/src/dotstar.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DBOOTLOADER_SDK_3_3_0_PARTICLE -DPARTICLE_DCT_COMPATIBILITY -DSPARK_PLATFORM_NET=BCM9WCDUSI09 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x80A0000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=5 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,1002 -DMODULE_DEPENDENCY2=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-6-mdotstar/src/dotstar.o lib/dotstar/src/dotstar.cpp

Building cpp file: lib/neopixel/src/neopixel.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-6-mneopixel/src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=6 -DPLATFORM_NAME=photon -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD006 -DUSBD_PID_CDC=0xC006 -DSPARK_PLATFORM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=6 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=1.0.1 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../services/nanopb -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/photon -I../hal/src/stm32f2xx -I../hal/src/stm32 -I../hal/src/photon/api -I../hal/src/photon/include -I../hal/src/photon/wiced/security/BESL/host/WICED/ -I../hal/src/photon/wiced/security/BESL/include -I../hal/src/photon/wiced/security/BESL -I../hal/src/photon/wiced/security/BESL/crypto -I../hal/src/photon/wiced/WWD/include/ -I../hal/src/photon/wiced/platform/include/ -I../hal/src/photon/wiced/platform/GCC/ -I../hal/src/photon/wiced/security/BESL/supplicant/ -I../hal/src/photon/libraries/crypto -I../platform/shared/inc -I../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F2xx/CMSIS/Include -I../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../dynalib/inc -Isrc -I./libraries -Ilib/dotstar/src -Ilib/neopixel/src -I. -MD -MP -MF ../build/target/user/platform-6-mneopixel/src/neopixel.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DBOOTLOADER_SDK_3_3_0_PARTICLE -DPARTICLE_DCT_COMPATIBILITY -DSPARK_PLATFORM_NET=BCM9WCDUSI09 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x80A0000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=5 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,1002 -DMODULE_DEPENDENCY2=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-6-mneopixel/src/neopixel.o lib/neopixel/src/neopixel.
Error: Command failed: /Users/nickjonas/.vscode/extensions/particle.particle-vscode-core-1.5.3/src/cli/bin/darwin/amd64/particle cloud compile photon --target 1.0.1 --no-update-check


Compiling code for photon
Targeting version: 1.0.1

Including:
    lib/dotstar/src/dotstar.h
    lib/dotstar/src/dotstar/dotstar.h
    lib/neopixel/src/neopixel.h
    lib/neopixel/src/neopixel/neopixel.h
    src/raincheck.ino
    lib/dotstar/examples/1-strandtest/1-strandtest.cpp
    lib/dotstar/src/dotstar.cpp
    lib/neopixel/examples/a-rainbow/a-rainbow.cpp
    lib/neopixel/examples/extra-examples/extra-examples.cpp
    lib/neopixel/examples/rgbw-strandtest/rgbw-strandtest.cpp
    lib/neopixel/src/neopixel.cpp
    src/raincheck.cpp
    project.properties
attempting to compile firmware 

Processing  src/raincheck.ino
Checking library dotstar...
Checking library neopixel...
Installing library neopixel 1.0.0 to lib/neopixel ...
Installing library dotstar 0.0.5 to lib/dotstar ...
Library neopixel 1.0.0 installed.
Library dotstar 0.0.5 installed.
make -C ../modules/photon/user-part all
make[1]: Entering directory '/firmware/modules/photon/user-part'
make -C ../../../user 
make[2]: Entering directory '/firmware/user'
Building cpp file: src/raincheck.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-6-msrc/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=6 -DPLATFORM_NAME=photon -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD006 -DUSBD_PID_CDC=0xC006 -DSPARK_PLATFORM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=6 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=1.0.1 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../services/nanopb -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/photon -I../hal/src/stm32f2xx -I../hal/src/stm32 -I../hal/src/photon/api -I../hal/src/photon/include -I../hal/src/photon/wiced/security/BESL/host/WICED/ -I../hal/src/photon/wiced/security/BESL/include -I../hal/src/photon/wiced/security/BESL -I../hal/src/photon/wiced/security/BESL/crypto -I../hal/src/photon/wiced/WWD/include/ -I../hal/src/photon/wiced/platform/include/ -I../hal/src/photon/wiced/platform/GCC/ -I../hal/src/photon/wiced/security/BESL/supplicant/ -I../hal/src/photon/libraries/crypto -I../platform/shared/inc -I../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F2xx/CMSIS/Include -I../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../dynalib/inc -Isrc -I./libraries -Ilib/dotstar/src -Ilib/neopixel/src -I. -MD -MP -MF ../build/target/user/platform-6-msrc/raincheck.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DBOOTLOADER_SDK_3_3_0_PARTICLE -DPARTICLE_DCT_COMPATIBILITY -DSPARK_PLATFORM_NET=BCM9WCDUSI09 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x80A0000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=5 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,1002 -DMODULE_DEPENDENCY2=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-6-msrc/raincheck.o src/raincheck.cpp

Building cpp file: lib/dotstar/src/dotstar.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-6-mdotstar/src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=6 -DPLATFORM_NAME=photon -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD006 -DUSBD_PID_CDC=0xC006 -DSPARK_PLATFORM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=6 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=1.0.1 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../services/nanopb -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/photon -I../hal/src/stm32f2xx -I../hal/src/stm32 -I../hal/src/photon/api -I../hal/src/photon/include -I../hal/src/photon/wiced/security/BESL/host/WICED/ -I../hal/src/photon/wiced/security/BESL/include -I../hal/src/photon/wiced/security/BESL -I../hal/src/photon/wiced/security/BESL/crypto -I../hal/src/photon/wiced/WWD/include/ -I../hal/src/photon/wiced/platform/include/ -I../hal/src/photon/wiced/platform/GCC/ -I../hal/src/photon/wiced/security/BESL/supplicant/ -I../hal/src/photon/libraries/crypto -I../platform/shared/inc -I../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F2xx/CMSIS/Include -I../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../dynalib/inc -Isrc -I./libraries -Ilib/dotstar/src -Ilib/neopixel/src -I. -MD -MP -MF ../build/target/user/platform-6-mdotstar/src/dotstar.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DBOOTLOADER_SDK_3_3_0_PARTICLE -DPARTICLE_DCT_COMPATIBILITY -DSPARK_PLATFORM_NET=BCM9WCDUSI09 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x80A0000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=5 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,1002 -DMODULE_DEPENDENCY2=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-6-mdotstar/src/dotstar.o lib/dotstar/src/dotstar.cpp

Building cpp file: lib/neopixel/src/neopixel.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-6-mneopixel/src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=6 -DPLATFORM_NAME=photon -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD006 -DUSBD_PID_CDC=0xC006 -DSPARK_PLATFORM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=6 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=1.0.1 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../services/nanopb -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/photon -I../hal/src/stm32f2xx -I../hal/src/stm32 -I../hal/src/photon/api -I../hal/src/photon/include -I../hal/src/photon/wiced/security/BESL/host/WICED/ -I../hal/src/photon/wiced/security/BESL/include -I../hal/src/photon/wiced/security/BESL -I../hal/src/photon/wiced/security/BESL/crypto -I../hal/src/photon/wiced/WWD/include/ -I../hal/src/photon/wiced/platform/include/ -I../hal/src/photon/wiced/platform/GCC/ -I../hal/src/photon/wiced/security/BESL/supplicant/ -I../hal/src/photon/libraries/crypto -I../platform/shared/inc -I../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F2xx/CMSIS/Include -I../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../dynalib/inc -Isrc -I./libraries -Ilib/dotstar/src -Ilib/neopixel/src -I. -MD -MP -MF ../build/target/user/platform-6-mneopixel/src/neopixel.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DBOOTLOADER_SDK_3_3_0_PARTICLE -DPARTICLE_DCT_COMPATIBILITY -DSPARK_PLATFORM_NET=BCM9WCDUSI09 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x80A0000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=5 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,1002 -DMODULE_DEPENDENCY2=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-6-mneopixel/src/neopixel.o lib/neopixel/src/neopixel.
	at makeError (/Users/nickjonas/.vscode/extensions/particle.particle-vscode-core-1.5.3/node_modules/execa/index.js:174:9)
	at module.exports.Promise.all.then.arr (/Users/nickjonas/.vscode/extensions/particle.particle-vscode-core-1.5.3/node_modules/execa/index.js:278:16)

- - - -


@m_m I did the steps you mentioned for setting the loggingLevel, and the output when switching the Output pane to C/C++ and running cloud compile is this:

cpptools/activeDocumentChange
cpptools/textEditorSelectionChange
idle loop: reparsing the active document
Checking for syntax errors: file:///Users/nickjonas/Projects/raincheck/src/raincheck.ino
queue_update_intellisense for files in tu of: /Users/nickjonas/Projects/raincheck/src/raincheck.ino
errorSquiggles count: 0
Update IntelliSense time (sec): 0.263

now I get this error on a cloud compile

are you able to share your source code or a minimal version that reproduces the issue?

the output when switching the Output pane to C/C++

this line:

errorSquiggles count: 0

...tells me your intellisense issue is fixed :+1:

@m_m sure here it is, followed by a screenshot of the environment. Curious why something would compile locally but not on the cloud?

// This #include statement was automatically added by the Particle IDE.
// #include "dotstar/dotstar.h"
#include "neopixel.h"

//-------------------------------------------------------------------
// Control the LEDs from any two pins (Software SPI):
//--------------------------------------------------------
#define NUMPIXELS 8 // Number of LEDs in strip
#define DATAPIN   D4
#define CLOCKPIN  D5
#define PIXEL_TYPE WS2812B // for use with neopixel

// Adafruit_DotStar strip = Adafruit_DotStar(NUMPIXELS, DATAPIN, CLOCKPIN, DOTSTAR_RGB);
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUMPIXELS, DATAPIN, PIXEL_TYPE);
bool pulseFlag = true;

//-------------------------------------------------------------------
// NOTE: If you find that the colors you choose are not correct,
// there is an optional 2nd argument (for HW SPI) and 
// 4th arg. (for SW SPI) that you may specify to correct the colors.
//-------------------------------------------------------------------
// e.g. Adafruit_DotStar(NUMPIXELS, DOTSTAR_RGB);
// e.g. Adafruit_DotStar(NUMPIXELS, DATAPIN, CLOCKPIN, DOTSTAR_RGB);
//
// DOTSTAR_RGB
// DOTSTAR_RBG`
// DOTSTAR_GRB
// DOTSTAR_GBR (default)
// DOTSTAR_BRG
// DOTSTAR_BGR 

void setup() {
    
    strip.begin(); // Initialize pins for output
    strip.show();  // Turn all LEDs off ASAP
  
    Serial.begin(115200);
    
    // listen for the hook response
    Particle.subscribe("hook-response/get_weather", onWeatherData, MY_DEVICES);
    
    // Lets give ourselves 10 seconds before we actually start the program.
    // That will just give us a chance to open the serial monitor before the program sends the request
    for(int i=0;i<10;i++) {
        Serial.println("waiting " + String(10-i) + " seconds before we publish");
        delay(1000);
    }
}

void loop() {
    // // publish the event to trigger our webhook
    // // new york variables: lat=40.7127, lon=-74.0059
    // Particle.publish("get_weather", "{ \"lat\": 40.7127, \"lon\": -74.0059 }");
    
    // // wait 20 seconds
    // delay(20000);

    pulseFlag = !pulseFlag;
    pulse(15);
}

// responses come in 512 byte chunks
// example response: "15,50,255,1|15,50,255,1|15,50,255,1|15,50,255,1|15,50,255,1|15,50,255,1|15,50,255,1|15,50,255,1|"
void onWeatherData(const char *name, const char *data) {
    String str = String(data);
    int lastHourSeparatorIndex = 0;
    while(str.indexOf("|", lastHourSeparatorIndex) >= 0){ // while there are more hour values
        int newHourSeparatorIndex = str.indexOf("|", lastHourSeparatorIndex);
        String hourSubstr = str.substring(lastHourSeparatorIndex, newHourSeparatorIndex);
        hourSubstr.replace("\"", "");
        // Serial.println("TEST: " + hourSubstr);
        
        Particle.publish("test_hoursubstr", hourSubstr, PUBLIC);
        
        int colors[4];
        int lastColorIndex = 0;
        while(hourSubstr.indexOf(",", lastColorIndex) >= 0){ // while there are more colors 
            int newColorIndex = hourSubstr.indexOf(",", lastColorIndex);
            String thisColor = hourSubstr.substring(lastColorIndex, newColorIndex);
            Particle.publish("test_color_str", thisColor, PUBLIC);
            int color = atoi(thisColor);
            // Serial.println("Color: " + color);
            colors[lastColorIndex] = color;
            lastColorIndex = newColorIndex + 1;
        }
        strip.setPixelColor(newHourSeparatorIndex, colors[0], colors[1], colors[2]);
        Serial.println("-----------");
        
        lastHourSeparatorIndex = newHourSeparatorIndex + 1;
    }
}

void pulse(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256; j++) {
    for(i=0; i<strip.numPixels(); i++) {
    //   strip.setPixelColor(i, Wheel((i+j) & 255));
    strip.setPixelColor(i, strip.Color(0, 0, 255));
    }
    
    uint16_t brightness = (pulseFlag) ? j : 255 - j;
    strip.setBrightness(brightness);
    
    strip.show();
    delay(wait);
  }
}

// Set all pixels in the strip to a solid color, then wait (ms)
void colorAll(uint32_t c, uint8_t wait) {
  uint16_t i;
  
  for(i=0; i < strip.numPixels(); i++) {
    strip.setPixelColor(i, c);
  }
  strip.show();
  delay(wait);
}

1 Like

:thinking: hm. it doesn’t look like you are using the dotstar library - can you try deleting it?

from within VSCode:

  1. right-click on the ./lib/dotstar directory and select “Delete”
  2. open your project.properties file
  3. remove the dependencies.dotstar=0.0.5 line and save
  4. run the Particle: Cloud Compile

when i include the dotstar library, i see an error compiling via the cloud. with it removed, compiling via the cloud and locally works fine. i’m not sure what the underlying compatibility issue is and, yeah, the error that’s returned isn’t super-helpful from what i can tell :confounded::disappointed:

THANK YOU - okay that worked. However, the intention was to use both libraries, so when I do uncomment & use dotstar as well, I suddenly get this issue in lib’s source:

There’s also a naming conflict with PIN_MAP2 between both libraries, but I simply changed the variable name in dotstar’s.

Are you able to import & include both?

Just as a heads-up:
When you install a library from the Particle repo the local build will always use the local copy but the cloud build will rather use the version that is registered as a dependency in project.properties.
So if you ever alter the local copy of the library you also need to remove/comment the dependency entry in project.properties to make sure you are uploading your locally modified version to the build farm - however, then you may also run into problems with the library examples.

1 Like

Thanks! Does the local lib folder get ignored in a cloud compile then (do I need to pull a locally changed library into my src folder)?

In any case, pulling down a fresh copy of dotstar.cpp yields these pinSet errors and I’m unfortunately not savvy enough with C++ to understand how to address that error :frowning:

Sort of. The project.properties file takes precedent to reduce the need for file uploads.

No, you just need to do as I said above

1 Like

Got it thanks.

Any idea why I’d be getting expression must be a pointer to a complete object type on the out-of-the-box dotstar library, as mentioned above?

pulling down a fresh copy of dotstar.cpp yields these pinSet errors

eh, i'd be willing to bet the errors being shown in the "problems" panel inside of VSCode aren't accurate:

you could try:

  1. close VSCode
  2. delete the ipch directory within ~/.vscode-cpptools/
  3. reopen VSCode
  4. wait for intellisense scan to complete

bottom-line: if it compiles, you can safely ignore the "problems" though i recognize that is not the ideal UX

1 Like

Oh I see. Okay, it continues to show the errors but actually does compile locally (after I fix the naming conflicts) and then compiles on the cloud (after I comment out the library dependency). Thank you both!

2 Likes

glad you are back in action, really sorry for the bumps :pray::+1: