Menu

Five things I learned building an app that counts workout reps with the phone camera
📰

Five things I learned building an app that counts workout reps with the phone camera

DEV Community: reactnative·George from FitnessBruh·1 day ago
#FpGA9WS1
#devtoreactnative#devto#dev#fitnessbruh#count
Long article (613 words) — no AI summary yet.
Reading 0:00
15s threshold

I'm the solo developer of FitnessBruh, a workout app for iPhone and Android. You prop the phone against something, step back, and it counts your reps out loud. It is a React Native app, and everything the camera sees is processed on the phone.

Counting sounds like the easy part. It is not. Here is what I learned.

1. A rep is a round trip, not a peak

The obvious way to count is to fire whenever a joint angle crosses a threshold. That also counts half curls and bounces.

In FitnessBruh a rep has to leave a start position, reach the far position and come back. A half curl that never reaches the top is not counted, and the rep is not finished until the arm is straight again. The same rule covers every exercise: pull ups only begin after the app has seen a full hang, and a jumping jack needs arms up and feet apart together, then arms down and feet together. Arms alone do not move the number.

2. The hardest test is standing still

It is easy to count ten clean reps.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.