# jrkashani/arduino architecture

> Architecture diagram of the GitHub repository jrkashani/arduino, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jrkashani/arduino
- Repository: https://github.com/jrkashani/arduino

## Overview

This repository is an Arduino robot project with several historical maze-navigation sketches, sensor/motor libraries, and a later calibrated-motion experiment. The clearest product workflow is the Romba maze robot: navigation reads stage-specific sensor data and issues movement commands. The source index and excerpts support those links, but do not expose the full sketch entry point or all sensor-driver wiring, so those relationships are not inferred. The graph also retains the separate motion experiment and reusable sensor/actuator libraries as distinct branches.

Main entry points: [`OLD/Romba_Maze/Navigation.cpp`](https://github.com/jrkashani/arduino/blob/main/OLD/Romba_Maze/Navigation.cpp) (Maze Navigation), [`OLD/Romba_Maze/Sensors.cpp`](https://github.com/jrkashani/arduino/blob/main/OLD/Romba_Maze/Sensors.cpp) (Sensor Acquisition), [`OLD/Romba_Maze/Globals.cpp`](https://github.com/jrkashani/arduino/blob/main/OLD/Romba_Maze/Globals.cpp) (Robot State), [`last_chance/MotionCapsule.cpp`](https://github.com/jrkashani/arduino/blob/main/last_chance/MotionCapsule.cpp) (Motion Capsule)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_robot["Maze Robot"]
  node_navigation["Maze Navigation<br/>[Navigation.cpp]"]
  node_sensor_acquisition["Sensor Acquisition<br/>[Sensors.cpp]"]
  node_robot_state["Robot State<br/>[Globals.cpp]"]
end

subgraph group_motion["Motion Experiment"]
  node_motion_config["Motion Calibration<br/>[DEFINE.h]"]
  node_imu_capsule["IMU Capsule<br/>[ImuCapsule.cpp]"]
  node_motion_capsule["Motion Capsule<br/>[MotionCapsule.cpp]"]
  node_motion_test["Motion Test<br/>[MotionTest.cpp]"]
end

subgraph group_drivers["Hardware Libraries"]
  node_steering["Dual H-Bridge Steering<br/>[SteeringDualH.cpp]"]
  node_motor["Motor Control<br/>[Motor.cpp]"]
  node_ultrasonic["Ultrasonic Driver<br/>[Ultrasonic.cpp]"]
  node_tof["VL53L0X Ranging<br/>[VL53L0X.cpp]"]
  node_imu["ADXL335 Orientation<br/>[ADXL335_IMU.cpp]"]
end

subgraph group_legacy["Earlier Sketches"]
  node_old_maze["Maze Runner Sketch"]
  node_old_project["Earlier Robot Project<br/>[Globals.cpp]"]
end

node_operator(("Robot Operator"))

node_operator -.->|"starts robot"| node_navigation
node_navigation -->|"reads sensors"| node_sensor_acquisition
node_navigation -->|"commands movement"| node_steering
node_sensor_acquisition -.->|"updates readings"| node_robot_state
node_robot_state -->|"declares actuator"| node_steering
node_imu_capsule -->|"uses settings"| node_motion_config
node_motion_capsule -->|"uses settings"| node_motion_config
node_motion_test -->|"uses motion"| node_motion_capsule

click node_navigation "https://github.com/jrkashani/arduino/blob/main/OLD/Romba_Maze/Navigation.cpp"
click node_sensor_acquisition "https://github.com/jrkashani/arduino/blob/main/OLD/Romba_Maze/Sensors.cpp"
click node_robot_state "https://github.com/jrkashani/arduino/blob/main/OLD/Romba_Maze/Globals.cpp"
click node_steering "https://github.com/jrkashani/arduino/blob/main/libraries/SteeringDualH/SteeringDualH.cpp"
click node_motor "https://github.com/jrkashani/arduino/blob/main/libraries/Motor/Motor.cpp"
click node_ultrasonic "https://github.com/jrkashani/arduino/blob/main/libraries/Ultrasonic/Ultrasonic.cpp"
click node_tof "https://github.com/jrkashani/arduino/blob/main/libraries/VL53L0X/VL53L0X.cpp"
click node_imu "https://github.com/jrkashani/arduino/blob/main/libraries/ADXL335_IMU/ADXL335_IMU.cpp"
click node_motion_config "https://github.com/jrkashani/arduino/blob/main/last_chance/DEFINE.h"
click node_imu_capsule "https://github.com/jrkashani/arduino/blob/main/last_chance/ImuCapsule.cpp"
click node_motion_capsule "https://github.com/jrkashani/arduino/blob/main/last_chance/MotionCapsule.cpp"
click node_motion_test "https://github.com/jrkashani/arduino/blob/main/last_chance/MotionTest.cpp"
click node_old_maze "https://github.com/jrkashani/arduino/blob/main/OLD/Maze_Runner/Globals_and_friends.cpp"
click node_old_project "https://github.com/jrkashani/arduino/blob/main/OLD/final_project/Globals.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_navigation,node_sensor_acquisition,node_robot_state toneBlue
class node_motion_config,node_imu_capsule,node_motion_capsule,node_motion_test toneAmber
class node_steering,node_motor,node_ultrasonic,node_tof,node_imu toneMint
class node_old_maze,node_old_project toneRose
class node_operator toneIndigo
```

## Components

### Maze Robot

- [Maze Navigation](https://github.com/jrkashani/arduino/blob/main/OLD/Romba_Maze/Navigation.cpp): `OLD/Romba_Maze/Navigation.cpp`
- [Sensor Acquisition](https://github.com/jrkashani/arduino/blob/main/OLD/Romba_Maze/Sensors.cpp): `OLD/Romba_Maze/Sensors.cpp`
- [Robot State](https://github.com/jrkashani/arduino/blob/main/OLD/Romba_Maze/Globals.cpp): `OLD/Romba_Maze/Globals.cpp`

### Motion Experiment

- [Motion Calibration](https://github.com/jrkashani/arduino/blob/main/last_chance/DEFINE.h): `last_chance/DEFINE.h`
- [IMU Capsule](https://github.com/jrkashani/arduino/blob/main/last_chance/ImuCapsule.cpp): `last_chance/ImuCapsule.cpp`
- [Motion Capsule](https://github.com/jrkashani/arduino/blob/main/last_chance/MotionCapsule.cpp): `last_chance/MotionCapsule.cpp`
- [Motion Test](https://github.com/jrkashani/arduino/blob/main/last_chance/MotionTest.cpp): `last_chance/MotionTest.cpp`

### Hardware Libraries

- [Dual H-Bridge Steering](https://github.com/jrkashani/arduino/blob/main/libraries/SteeringDualH/SteeringDualH.cpp): `libraries/SteeringDualH/SteeringDualH.cpp`
- [Motor Control](https://github.com/jrkashani/arduino/blob/main/libraries/Motor/Motor.cpp): `libraries/Motor/Motor.cpp`
- [Ultrasonic Driver](https://github.com/jrkashani/arduino/blob/main/libraries/Ultrasonic/Ultrasonic.cpp): `libraries/Ultrasonic/Ultrasonic.cpp`
- [VL53L0X Ranging](https://github.com/jrkashani/arduino/blob/main/libraries/VL53L0X/VL53L0X.cpp): `libraries/VL53L0X/VL53L0X.cpp`
- [ADXL335 Orientation](https://github.com/jrkashani/arduino/blob/main/libraries/ADXL335_IMU/ADXL335_IMU.cpp): `libraries/ADXL335_IMU/ADXL335_IMU.cpp`

### Earlier Sketches

- [Maze Runner Sketch](https://github.com/jrkashani/arduino/blob/main/OLD/Maze_Runner/Globals_and_friends.cpp): `OLD/Maze_Runner/Globals_and_friends.cpp`
- [Earlier Robot Project](https://github.com/jrkashani/arduino/blob/main/OLD/final_project/Globals.cpp): `OLD/final_project/Globals.cpp`

### Other components

- **Robot Operator**

## Connections

- Robot Operator → Maze Navigation: starts robot
- Maze Navigation → Sensor Acquisition: reads sensors (evidence: `OLD/Romba_Maze/Navigation.cpp`)
- Maze Navigation → Dual H-Bridge Steering: commands movement (evidence: `OLD/Romba_Maze/Navigation.cpp`)
- Sensor Acquisition → Robot State: updates readings
- Robot State → Dual H-Bridge Steering: declares actuator
- IMU Capsule → Motion Calibration: uses settings (evidence: `last_chance/ImuCapsule.cpp`)
- Motion Capsule → Motion Calibration: uses settings (evidence: `last_chance/MotionCapsule.cpp`)
- Motion Test → Motion Capsule: uses motion (evidence: `last_chance/MotionTest.cpp`)
