How davood-dorostkar/arduino_tutorials works
Project type and purpose
• This is an educational “Arduino_PlatformIO” tutorial repository.
• It’s a collection of standalone Arduino/PlatformIO projects (from simple LED blink to wireless, displays, motors, sensors, etc.) organized by chapter.
• Each sub-folder (e.g. “03-Temperature/DHT11”) is a complete PlatformIO project: source code, headers, libraries, tests, build config.
File structure
• Top-level:
– README.md, LICENSE, .gitignore (repo-wide)
– Folders “02-Software” through “20-Proteus” – each is a chapter.
• Chapter folders:
– Multiple example subfolders (one per sensor/actuator)
– Each example has:
• / ← public headers & example-specific docs
• lib/ ← local or vendor libraries
• src/ ← C++/Arduino source files
• test/ ← PlatformIO unit/integration tests
• platformio.ini ← build & upload configuration
• .travis.yml ← CI build/test integration
• Patterns:
– Uniform PlatformIO project layout
– CI (Travis) to auto-build & run tests
– Hardware interface modules vary per example
README
• Confirms: “Arduino tutorial written with VSCode/PlatformIO”
• Audience: beginners to advanced Arduino users
• Purpose: learning material, code, schematics, explanations hosted on SanatBazar
Main components
a. Developer environment
– VSCode + PlatformIO extension / CLI
– Git (local & GitHub)
b. Continuous integration
– Travis CI reading .travis.yml in each sub-project
– Builds and runs PlatformIO tests
c. Repository structure
– Root: tutorial repo
– Chapter modules: 02-20 containing examples
– Each example: include, lib, src, test, platformio.ini
d. Build & deployment
– PlatformIO (build system)
– Arduino boards (target hardware)
– Sensors/Actuators (hardware modules per example)
e. External services
– SanatBazar documentation website
– GitHub hosting
Relationships & interactions
– Developer commits code → pushes to GitHub
– Push triggers Travis CI → for each example’s .travis.yml:
• PlatformIO builds firmware
• PlatformIO runs unit/tests
– Developer uses VSCode/PlatformIO to build/upload to Arduino hardware
– Firmware interacts with hardware modules: sensors (e.g. DHT11), actuators (e.g. Servo)
– Libraries in lib/ and PlatformIO registry supply drivers
Architectural patterns & principles
– Modular folder/project per example (separation of concerns)
– Consistent PlatformIO project template (include/lib/src/test)
– CI pipeline per module ensures code quality
– Reuse of libraries (local lib folder or registry)
Don’t overthink it
– Capture each layer: developer, repository, CI, build system, hardware
– Separate into as many components as possible (root, chapters, examples, code layers, CI, hardware)