Project structure and GitLab workflow
Good project structure makes it easier to collaborate, debug, and hand in your work. This page suggests a simple layout and workflow for Arduino/ESP32 projects using GitLab.
1. Suggested repository layout
For a typical course project, use a structure like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
Guidelines:
- Keep each sketch in its own folder inside
embedded/.- To test a sensor or actuator, write and store a sketch in a dedicated folder. This is a good way to test the sensor or actuator before using it in the project.
- Store wiring diagrams, photos, and documentation in
docs/.
Tracking versions of your sketches
Instead of keeping many copies like code_v2_final_definitive.ino, let Git handle history:
- Keep the current version as
main.inoorproject.inoin a folder. - Use informative commit messages to track changes.
- Optionally tag important milestones (e.g.
v1.0-demo).
This makes it easier for others (and your future self) to see how the project evolved.