Home › Forums › Miscellaneous › Issues with compiling modular sensors library
Tagged: ModularSensors, software libraries
- This topic has 3 replies, 2 voices, and was last updated 2020-06-30 at 4:51 PM by Sara Damiano.
2020-06-30 at 2:33 PM #14271LetsidParticipant
I have made good progress with the learn EnviroDIY course. However, I have yet to succeed in compiling my .ini files when the modular sensors library is included under lib_deps. I skipped over this problem in some of the earlier lessons, such as the one using the DallasTemperature for temperature readings, by simply removing the modular sensors library and only using the libraries that were needed for the respective code. Those worked like a charm. Now that I am on the simple logging example and trying to move into the final phases of getting my units built, I need to figure out what I am doing wrong with the modular sensors library! Note, I am using Visual Studio Code.
Attached is a screen shoot of my .ini file. It is taken from the following Github page: https://github.com/EnviroDIY/ModularSensors/blob/master/examples/simple_logging/platformio.ini
Upon compiling an error inevitably occurs. Attached is screen shot of the most common result (there have been others). The src for this example is taken from the following Github page: https://github.com/EnviroDIY/ModularSensors/blob/master/examples/simple_logging/simple_logging.ino
I very much appreciate any insights or tips that are provided. If I can get my library issues sorted out, it will really help to get my momentum going again towards getting some units into the field. Thanks!
2020-06-30 at 3:29 PM #14274Sara DamianoModerator
Well compiler errors are never fun.
It looks like platformio didn’t complete the recursive dependency library installation correctly. That sometimes happens when it’s trying to install all the dependencies for ModularSensors at once.
You can check what libraries it did install in the .pio/libdeps/mayfly folder of your project. You might see some folders with names like _tmp_junk_. If you do, you can just delete them. When platformio attempts to download a library it first puts it in a temporary folder and then unpacks it and those remnants sometimes get left over when things go wrong.
To give it another chance to install the missing libraries, open up a new terminal in your project and type
pio lib install
. You should see it go through and check for dependencies and for each say “is already installed” or install it.
If you really can’t get it to install the libraries that way, you can install the dependencies one at a time with
pio lib install zzz
where zzz is the name of the library. You shouldn’t need to do that though.
2020-06-30 at 4:45 PM #14276LetsidParticipant
The pio lib install worked! Thank you so, so, so much.
2020-06-30 at 4:51 PM #14277Sara DamianoModerator
Yay! I’m glad it worked!
- You must be logged in to reply to this topic.