Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Reply To: platformio.ini help

Home Forums Mayfly Data Logger platformio.ini help Reply To: platformio.ini help


    @ldecicco congrats on trying the platformio – it has a lot of professional capability, but like anything – getting in a fancy plane(!) there are lots of bells and whistles that can go off.

    For “new” libs there are at least two ways to work with them, a)  put the full path to them under libdeps

    I find a https://github.com/arduino-libraries/ArduinoMqttClient

    and in the platformio.ini

    This pulls into your directory under .pio\libdeps\mayfly

    b) clone to directory <lib> – that is go to the directory lib and run

    git clone git@github.com:arduino-libraries/ArduinoMqttClient.git

    Check that its been installed correctly and builds OK. Also then need to make sure its also not specified in platformio.ini as it will also be pulled in to .pio\libdeps\mayfly and compile there instead.

    To be able to modify a lib, there are a couple more stages – assuming you have a github account, first on github fork the lib, then clone it into the local lib directory.  Check that its building ok from that directory. Then make modifications, finally “git push” back to your forked repo.

    For a number of examples, you could look at my forks in

    https://github.com/neilh10/ModularSensors/tree/release1/examples/tu_xx01 – and say how I manage TinyGSM – the amazing AT interface lib  ~ see

    https://github.com/neilh10/TinyGSM.git<span class=”pl-c”>#rel1 ;Bug fixes over Envirodiy</span>

    It is very powerful, however does require a lot of learning by doing and also checking out other examples.

    It does also require following how git works – for instance on a repo fork I try and add to a different “branch” than what the source uses. so envirodiy specifies “master”, but I create and add to “release1”, and then in the repo make that the source branch.

    To understand git,  I prefer the cmd line interface, as I don’t quite trust what the gui github client to tell me what its doing. I do use the vsc git for looking at differences. I often make small changes, say in a comment, just to test out how it works, and verify that its getting to the online repo correctly. I keep a “<project>-diary.docx” of what I’ve done that works.  Its pretty amazing, however it can take some curating to know the sequences to make it work.

    Hope that works for you