Rep Counter Is Counting Reps for Athletes in Workouts While Showing Motivational Phrases During the Training to Motivate and Push Them Further.

by Romero yhuhui in Circuits > Arduino

10 Views, 0 Favorites, 0 Comments

Rep Counter Is Counting Reps for Athletes in Workouts While Showing Motivational Phrases During the Training to Motivate and Push Them Further.

WhatsApp Image 2025-05-29 at 9.27.55 AM (1).jpeg
R.png
OIP.png

This project basically is to help athletes in their workout. As an athlete you will find yourself that you forget how many sets and how many reps but in this project, it will help you to memorize them and giving you motivational messages.

Supplies

OIP.png
R.png
LCD-screen.png

I used arduino, ir sensor that detects the rep, lcd screen to show how many reps and a reset button

8a9a7538c82a3cc863c7eed2278eb8dd.png

Here is the attachments of the project itself

Here is the code

include <Wire.h>

#include <LiquidCrystal_I2C.h>


LiquidCrystal_I2C lcd(0x27, 16, 2); // Change 0x27 if needed

const int sensorPin = 3;

const int buttonPin = 4; // Restart button pin


int repCount = 0;

bool motionDetected = false;


String messages[] = {

"You got this!",

"Keep pushing!",

"Almost there!",

"Feel the burn!",

"Stronger every rep!",

"Don't give up!",

"Yeahh buddy!"

};


void setup() {

Serial.begin(9600);

pinMode(sensorPin, INPUT);

pinMode(buttonPin, INPUT_PULLUP); // Button with internal pull-up


lcd.init();

lcd.backlight();

lcd.setCursor(0, 0);

lcd.print("Reps: 0");

randomSeed(analogRead(0));

Serial.println("Setup done.");

}


void loop() {

// Check if restart button is pressed (LOW because of pull-up)

if (digitalRead(buttonPin) == LOW) {

repCount = 0;

lcd.clear();

lcd.setCursor(0, 0);

lcd.print("Reps reset!");

delay(1000);

lcd.clear();

lcd.setCursor(0, 0);

lcd.print("Reps: 0");

Serial.println("Counter reset.");

delay(500); // debounce delay

}


int sensorValue = digitalRead(sensorPin);

Serial.print("Sensor: ");

Serial.println(sensorValue);


if (sensorValue == LOW && !motionDetected) {

repCount++;

motionDetected = true;


Serial.print("Rep counted: ");

Serial.println(repCount);


lcd.clear();

lcd.setCursor(0, 0);

lcd.print("Reps: ");

lcd.print(repCount);


if (repCount % 10 == 0) {

int msgIndex = random(0, 7);

Serial.print("Message: ");

Serial.println(messages[msgIndex]);

lcd.setCursor(0, 1);

lcd.print(messages[msgIndex]);

delay(3000);

lcd.clear();

lcd.setCursor(0, 0);

lcd.print("Reps: ");

lcd.print(repCount);

}


delay(500);

} else if (sensorValue == HIGH) {

motionDetected = false;

}

}

WhatsApp Image 2025-05-29 at 9.34.49 AM.jpeg

This is the project with the working LCD