Skip to content

johannaresh/Hack-Western

Repository files navigation

Real-Time Gym Rep Counter (Hack Western)

A real-time gym rep counter that streams motion sensor data to a live web dashboard, detects reps with low latency, and optionally persists session state.

⚠️ Hardware required: This project depends on live accelerometer/gyroscope data from a sensor device. Without the physical hardware, you can still review the code, run the dashboard/server, and (optionally) replay sample data if included.


Demo (What it does)

  • Streams high-frequency IMU (accelerometer + gyroscope) data from a sensor device
  • Detects reps using filtering + peak/valley logic + debouncing and timing constraints
  • Broadcasts live rep count + metrics to a dashboard via WebSockets
  • Optionally persists session state (counts, metrics) to Supabase

Tech Stack

  • Sensor / Signal Processing: C++ (rep detection logic)
  • Backend: Node.js (ingestion + validation + buffering + WebSockets)
  • Frontend: HTML/CSS/JavaScript (live dashboard)
  • Storage (optional): Supabase (session state)
  • Build tooling (C++): vcpkg / CMake (if applicable)

Architecture

Sensor Device (IMU) → Backend → Dashboard

  1. Sensor device streams timestamped IMU frames.
  2. Backend ingests frames, validates schema, buffers, and forwards updates over WebSockets.
  3. Dashboard subscribes to the WebSocket feed and renders live rep count + session metrics.
  4. Session state is written/read from Supabase for persistence.

Repository Structure

.
├── sensor/                  # Firmware + sensor streaming code (hardware required)
│   ├── src/
│   └── README.md            # Wiring / flashing notes (if included)
├── rep_detection/           # C++ rep logic (filtering, peaks, debouncing)
│   ├── src/
│   └── CMakeLists.txt
├── server/                  # Node.js ingestion + WebSocket server
│   ├── src/
│   ├── package.json
│   └── .env.example
├── dashboard/               # HTML/CSS/JS client
│   ├── index.html
│   ├── styles.css
│   └── script.js
└── docs/                    # Diagrams, sample frames, notes (optional)

About

HWXII

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •