I am running into some trouble using cloud compile/ cloud flash in Workbench. Local compile seems to work fine.
I did read through the other posts on similar issue, mine is little different (I think). I in the source folder I have the .INO file. I have a sub folder under the root directory names ‘external’ in which I am planning to add all ‘other’ files i.e .H and .CPP I created subfolders for each sensor, neatly packing the corresponding set of files into each folder.
Of course I amend the paths in all files to match the location. The works fine for two out of the three sensors so far. The moment I move the temperature sensor .h and .cpp files into the …/external/temperature/ folder, all hell breaks loose and I am unable to cloud compile or flash. Local compile still works though. Please find attached below;
If I move (in this case) HS300x.h and HS300x.cpp back the src folder directly, change the paths again to reflect the same, the flash works seamlessly.
If at all possible, you should arrange your source like this:
This mimics the format used by Particle libraries, but does not require that the items in the lib directory are actually libraries. This format is used by Tracker Edge, and works for both cloud and local compiles.
The other advantage of using this format is that you can include the whole thing in your Github repository, or if you integrate other libraries that are stored in Github, you can do so using git submodules.
Thank you for the response. Still getting to know VSC; for the extremely little programming I have had to do up until this project, I used the webIDE. Thought I would give VSC a chance just incase I might need to start doing more coding myself going forward
I will restructure the files, no problem. Hopefully it will flash successfully then. The curveball for me was why this one particular library is causing this to fail.
I will make the changes and revert back. Thanks again, appreciate the help!
Thanks, it solved the problem. Still curious as to why it happened only when I added the HS300x subfolder and moved te files there.
The only scenario I did not test was to see if it maybe happened when exceeding two subfolders in the ‘incorrect way’ of setting up the folder structure. It was by chance that the HS300x folder was the third on each time as it was the third sensor added to the code.
Will add the rest now.