┌──────────────────────────┐ │ Start System │ └────────────┬─────────── │ ┌────────────▼─────────────┐ │ Initialize ESP32, I2C, │ │ MPU6050, GPIO pins │ └────────────┬─────────────┘ │ ┌────────────▼─────────────┐ │ Sensor Calibration │ │ (Baseline posture setup) │ └────────────┬─────────────┘ │ ┌────────────▼─────────────┐ │ Read IMU accelerometer │ │ & gyroscope data │ └────────────┬─────────────┘ │ ┌────────────▼─────────────┐ │ Compute posture angle │ │ (Sensor fusion + filter) │ └────────────┬─────────────┘ │ ┌────────────▼─────────────┐ │ Compare angle with │ │ Posture threshold │ └────────────┬─────────────┘ Yes │ No (Poor │ (Good posture) Posture) │ │ ┌──────────▼─────────┐ │ Activate vibration │ │ Motor (Feedback) │ └──────────┬─────────┘ │ ┌───────▼────────┐ │ Delay & Reset │ └───────┬────────┘ │ ┌────────▼─────────┐ │ Repeat Loop │ └──────────────────┘
by madhesh