Difference between revisions of "Exercise Recorder"
(→Equipment) |
|||
(10 intermediate revisions by one other user not shown) | |||
Line 4: | Line 4: | ||
| | | | ||
==Objective== | ==Objective== | ||
− | You can set exercise time | + | You can set the exercise time with it. So, when it comes to the pre-set time, a buzzer will ring. Only when completing the required amount of exercise can the buzzer stop. Here we adopt Microduino-Motion module to record the motion and count the frequency. |
[[File:Exercise_record-image.jpg|600px|center]] | [[File:Exercise_record-image.jpg|600px|center]] | ||
==Principle== | ==Principle== | ||
Setting exercise time with Microduino-RTC and when it comes to the pre-set time, a buzzer will ring. Only after completing the required exercise frequency can the buzzer stop. Here we adopt Microduino-Motion module to record your motion and count, and an OLED display module to show the current time and amount of exercise. | Setting exercise time with Microduino-RTC and when it comes to the pre-set time, a buzzer will ring. Only after completing the required exercise frequency can the buzzer stop. Here we adopt Microduino-Motion module to record your motion and count, and an OLED display module to show the current time and amount of exercise. | ||
− | [[File: | + | [[File:Exercise_Record1-sch.jpg|600px|center]] |
==Equipment== | ==Equipment== | ||
Line 28: | Line 28: | ||
| [[mCookie-BM]]||1||Battery management | | [[mCookie-BM]]||1||Battery management | ||
|- | |- | ||
− | | [[mCookie-Duo- | + | | [[mCookie-Duo-V2]]||1||Extension board |
|- | |- | ||
| [[Microduino-Buzzer]]||1||Buzzer sensor | | [[Microduino-Buzzer]]||1||Buzzer sensor | ||
Line 110: | Line 110: | ||
4. Find the code section above, set the exercise frequency, load the code into the CoreUSB module after the setting. When the buzzer goes on, the screen will switch to the display of the sports frequency. The buzzer will not stop until you complete the pre-set exercise frequency. | 4. Find the code section above, set the exercise frequency, load the code into the CoreUSB module after the setting. When the buzzer goes on, the screen will switch to the display of the sports frequency. The buzzer will not stop until you complete the pre-set exercise frequency. | ||
==Result== | ==Result== | ||
− | + | It can be used in exercise counting for sit-up, dumbbell lifting and so on. | |
− | [[File: | + | [[File:Exercise_Record.jpg|600px|center|excercise]] |
==Video== | ==Video== | ||
|} | |} |
Latest revision as of 09:23, 4 August 2017
Language: | English • 中文 |
---|
ContentsObjectiveYou can set the exercise time with it. So, when it comes to the pre-set time, a buzzer will ring. Only when completing the required amount of exercise can the buzzer stop. Here we adopt Microduino-Motion module to record the motion and count the frequency. PrincipleSetting exercise time with Microduino-RTC and when it comes to the pre-set time, a buzzer will ring. Only after completing the required exercise frequency can the buzzer stop. Here we adopt Microduino-Motion module to record your motion and count, and an OLED display module to show the current time and amount of exercise. Equipment
Preparation
Software Debugging
change_gx = (abs(gx) + abs(gy) + abs(gz)) / 3;
//Serial.println(change_gx);
if (change_gx > 80 && !sport_en)
sport_en = true;
else if (change_gx <= 10&&!sport_num)
{
timer_0 = millis();
sport_num = true;
}
if (sport_num)
{
if (millis()-timer_0 > 1000)
{
change_gx = (abs(gx) + abs(gy) + abs(gz)) / 3;
if (change_gx <= 10)
{
sport_num= false;
sport_en = false;
timer_0 = millis();
}
}
}
if (sport_change != sport_en && time_en)
{
if (sport_en)
{
Sport_num -= 1;
tone(buzzer_pin, 300);
if (Sport_num == 0)
{
time_en = false;
noTone(buzzer_pin);
}
}
//else
// noTone(buzzer_pin);
//Serial.println(sport_en);
sport_change = sport_en;
} Hardware Buildup
Code Debugging1.For the first use of Microduino-RTC, you need to set the initial time through programs, find the code section based on the picture above, set according to the local time and load the program into the RTC module through the CoreUSB module. 2.After that, you can add "//" in the front of the code section and the code will turn gray. At this time, please re-load the program into RTC module and then you can record time freely. 3.Find the code section above, set the exercise time, load the code into the CoreUSB module after the setting, you'll find when it comes to this time, the buzzer will go alarm. 4. Find the code section above, set the exercise frequency, load the code into the CoreUSB module after the setting. When the buzzer goes on, the screen will switch to the display of the sports frequency. The buzzer will not stop until you complete the pre-set exercise frequency. ResultIt can be used in exercise counting for sit-up, dumbbell lifting and so on. Video |