Push-up Arduino

That's a simple push-up meter

You need an Arduino, HC-SR04 and creativity for how to attach to your body

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Connections

Trig pin is on 13
Echo pin is on 12
Vcc = 5v
Gnd = gnd

Step 2:

Step 3:

#define trigPin 13
#define echoPin 12

int i;

void setup() {

Serial.begin (9600);

pinMode(trigPin, OUTPUT);

pinMode(echoPin, INPUT);


void loop() {

long duration, distance;

digitalWrite(trigPin, LOW); // Added this line

delayMicroseconds(2); // Added this line

digitalWrite(trigPin, HIGH);

// delayMicroseconds(1000); - Removed this line

delayMicroseconds(10); // Added this line

digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

distance = (duration/2) / 29.1;

if (distance >= 40 || distance <= 0){

//Serial.print("Out of range");

(distance = i);

(i++); //With every "out of range" there is +1 push up

Serial.print("/////" );





Step 4: Output

When is going to "out of range" there is a one more push - up!
Everything is in the code

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest