For starters, neither the
Arduino library (folder) or
CurieBLE library (folder) should be present in the global
Maybe this will make it clearer. Not all
#includes / libraries are libraries which you (the end user) should be managing, or be having anything to do with. Nor should be putting in any folders manually. Framework provided libraries are just that, libraries provided by the framework (e.g. Arduino), and all you do is do an
#include when you want to use them. That’s it. Another example would be the libraries provided by the ESP8266Arduino framework… you don’t install/manage libraries like
ESP8266WiFi.h, FS.h, ESP8266mDNS.h, ArduinoOTA.h, Ticker.h, etc… you just include them and they are there.
So, for libraries that are provided by the framework, if they are not found, something is misconfigured in your
platformio.ini. Also, since they are provided by the framework (
arduino in this case), there is also no need to use
lib_deps to instruct platformio that it needs to download them. Finally, there should only be one
lib_deps = reference in your
platformio.ini. If you need to list multiple libraries, list them one after the other like this
If you don’t have
framework = arduino in your
platformio.ini, that’s your problem.
Given that CurieBLE is specific to the Genuino101, I created a new project using your code, and used the following
platform = intel_arc32
board = genuino101
framework = arduino
It failed to compile …
… because the function was used before it was declared. Adding the declaration at the top …
… and it compiles just fine. And as you can see from the above screenshot, no IntelliSense / red squiggle issues.