Closed aufdenkampe closed 1 year ago
A suggested structure for this project might be:
Soil-Sensing-Device/
├── doc/
├── examples/
│ ├── getValuesCO2/
│ │ └── getValuesCO2.ino
│ ├── getValuesModularSensors/
│ │ └── getValuesModularSensors.ino
│ └── runSoilDevice/
│ └── runSoilDevice.ino
└── src/
├── main.h
├── sensors/
│ ├── co2_sensor.h
│ └── co2_sensor.cpp
└── soilDevice/
├── soilDevice.h
└── soilDevice.cpp
Maybe model a little bit like https://github.com/EnviroDIY/KellerModbus? I'll look for another example.
Nice work @bellahenkel! Completed with PR:
Arduino IDE and PlatformIO both have specific requirements the structure of a library, so that sketches and other source files are properly compiled.
The Arduino IDE and PlatformIO Part 1: How to structure a project to be compiled by both blog post describes why putting header and source files in the
src
directory and.ino
sketches in theexamples
directory is necessary. They provide the following example project as a summary:NOTE that as we move or rename files, it is important to use the
git mv
command to preserve git history. For details and examples, see https://www.educative.io/answers/how-to-rename-or-move-files-in-git.