Exercise Recorder
Language | English |
---|
ObjectiveDIY an electronic device to remind movement time and count all kinds of exercises. SchematicMicroduino-motion can detect motion change. The buzzer will make sound along with movement counting. Timing each exercise by RTC module, it can record four times of exercise. The current date and time will be displayed on OLED, which can be adjusted via Bluetooth on your phone. Equipment
Hardware Buildup
Software Debugging
#include <SoftwareSerial.h>
SoftwareSerial mySerial(4, 5); // RX, TX
//#define my_Serial mySerial
#define my_Serial Serial1
if (gy > 80 && ax > -50)
sport_en = true;
else if (gy < -80 && ax < -50)
sport_en = false;
if (sport_change != sport_en)
{
if (sport_en)
{
num += 1;
tone(buzzer_pin, 300);
Serial.println(num);
}
else
noTone(buzzer_pin);
sport_change = sport_en;
}
ResultYou can count the sit-ups, dumbbell and other exercises. Video |