“Exercise Recorder”的版本间的差异
(→Equipment) |
|||
第35行: | 第35行: | ||
*Other Equipment : | *Other Equipment : | ||
**One battery | **One battery | ||
− | **Lego | + | **Lego |
− | |||
− | |||
==Hardware Buildup== | ==Hardware Buildup== |
2015年9月23日 (三) 07:08的最新版本
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 |