Pedometer using Diamond's built in Accelerometer

Search This thread

lightsailpro

Senior Member
Apr 16, 2006
90
0
=========================================
3/14/2009 Pedometer 1.42 is released.

What's new:

--Fixed "InvalidCastException" error for non-english regional setting.


NOTE:
1) If you want to keep your old jogging data, and customized sound file and background file, you need to save the "pedometer.sdf", "background.jpg", and "StepSound.wav" files, install the new version, then copy back these files to \program files\elitemway\pedometer folder.
2) !!! The pedometer is designed to count relatively accurately when you carry the phone vertically or horizontally around you left or right side of your waist belt. It may give you wrong result if carry your phone otherwise. Step detection algorithm that can handle all carrying position and walking/running conditions is very complicated and is beyond my knowledge. Step length and Calories conversion are unique for each individual and walking condition. There is no way that this can be very accurate. You may adjust these values in the "Setting" screen. The application is not globalized yet. Like all other xda developers, I have to find spare time working on this project. Thank you for your understanding!


==================================================

3/12/2009 Pedometer 1.41 patch is released.


What's new:

--Fixed the version number.
--When you set the distance unit to "mile", it still displays the distance value as km. This bug is fixed in the patch.

Copy the attached zipped exe to elitemway\pedometer folder, override the existing one.

12/25/2008 Pedometer 1.4 is released. Merry Christmas and Happy New Year!

What's new:

--The pedometer should also work when carrying in horizontal position. Please report if the counting is accurate enough.
--Added "Show toolbar" setting so that you can choose whether to show the toolbar on the main screen.


12/16/2008 Pedometer 1.3 is released.

What's new:

--Added battery threshhold setting. The program will pause pedometer, automatically save the current progress and then allow device to go into standby mode based on the Power setting when battery level falls below a certain value.
--Relocate the buttons from the main screen to menu.
--Display battery status on the main screen.
--You can change the background by replacing the default "Background.jpg" file.


12/15/2008 Pedometer 1.2 is released.


What's new:

--Step detection is a little bit better. It still has a lot of room for improvement though.
--While Pedometer is running, the screen will dim, but will not standby.
--The "Hide" button not only turns off the screen, it can also prevent the device from going into stanby mode. So you can let it run in the background for a long time. If you want to keep it running, do not use the Power button, instead using the Hide button.
--Pause button stops both time and step count. It will also stop the timer. So when it is paused, the device can be in the standby mode to save battery.
--I let it run around 7 hrs in office environment with fully charged batterry (1350mAh), with Blackberry connect and a few emails, no step sound, I still had about 45% left at the end.
--You can mute the step sound from the main screen.
--Now it has the HTC Diamond black transparent background. See the screenshot.
--The default step sound is shorter and "big foot" like. You can customize the sound by replace the default "StepSound.wav" file (do not use anything above 0.2 sec). Nero 8 wave editor and other tool is good for sound editing.
--Added error handling for possible decimal conversion error due to different regional setting. As a workaround, you can probably change you regional setting to English, then run the application, finish the setting, then change it back.


12/13/2008 Pedometer Release 1.0 summary

I searched extensively for a pedometer application that works on Diamond, but could not find anything. So I created one.

--It uses HTC Touch Diamond's built in Accelerometer.
--Only .Net CF 2.0 is required (comes with Diamond).
--You can pause and reset the step counter.
--It displays steps, distance, calories and time duration.
--You can use the Hide button to save battery.
--You can set the step length and calories per mile value.
--You can save, delete and view the historical data.
--The historical data is stored in Microsoft SQLCe compact database.
--It can play the sound when the step is detected.
--It can sound an alarm when the set distance is reached.
--Briefly tested with the US unlocked version of the Diamond and Sprint version of the Diamond.
--The sensor.dll is from http://www.koushikdutta.com/search/label/Sensor%20API

Tips:
--First, verify and set your preferred setting from the menu item.
--Find the best carrying position with the "Play step sound" option on.
--Use the Hide button to save battery.
--You can install on storage card, but it can break the application if you use the storage mode while the Pedometer application is running.

Known Issues:

--Step detection is not accurate sometime. The algorithm needs improvement.
--Hide mode does not prevent from going into sleep mode.
--After changing the setting, you need to close then reopen the application for teh new setting to take effect.
--It only works if the diamond is in the vertical position.
 

Attachments

  • Screen01.jpg
    Screen01.jpg
    17.6 KB · Views: 17,166
  • Screen02.jpg
    Screen02.jpg
    20.3 KB · Views: 5,557
  • Screen041.png
    Screen041.png
    18.3 KB · Views: 5,267
  • Screen042.png
    Screen042.png
    12.3 KB · Views: 3,444
  • Screen05.png
    Screen05.png
    9.8 KB · Views: 3,351
  • elitemway_Pedometer_1.42.zip
    943.5 KB · Views: 15,525
Last edited:

fadywwf316

Member
Oct 8, 2007
34
0
any chance this would work on a touch pro? Also, if i wanted to leave it on all day just to basically see how many steps i'm getting in on a typical day, does that basically mean i'll have to recharge my phone everyday or is the battery footprint very low?

thanks!
 

Ikari

Senior Member
Mar 26, 2006
98
0
Thx for the ap, i was working on my one some time ago but stop after having bad etection when running, im going to test yours and given a feedback.
 

pinele

Senior Member
Nov 16, 2005
161
22
52
www.hdblog.it
work well on Touch HD and Diamond but... i run for twenty steps but... it counted only nine.. (bouth diamond and touch HD was in vertical position)...

thank you
 
Last edited:

lightsailpro

Senior Member
Apr 16, 2006
90
0
any chance this would work on a touch pro? Also, if i wanted to leave it on all day just to basically see how many steps i'm getting in on a typical day, does that basically mean i'll have to recharge my phone everyday or is the battery footprint very low?

thanks!

Not sure if it will work on TouchPro. It should work though. This utility is still in early development stage. I do not have battery consumption data yet. The key is to find a reliable step detection algorithm. Thanks.
 

eddieul

Senior Member
Sep 9, 2008
125
1
On my Touch Pro, RomeOS 1.51 :

When I try to run this APP.

Conversion from string "0.235" to type "Decimal" is not valid.

:(
 

malawito

Member
Apr 8, 2007
37
0
try changing your language options, there where any option to change the symbol of , to . or what else
 

lightsailpro

Senior Member
Apr 16, 2006
90
0
Pedometer version 1.2 is released

Hi, All:
After some intensive efforts, the Pedometer version 1.2 is released. The HTC touch black transparent looks much better. Please post all questions in this thread.
 

Blahzay

Member
Feb 20, 2008
8
0
Great App

thanks for great app. What would be really cool is if it would have its own TFlo3D tab.
 

defaria

Senior Member
Jun 13, 2007
175
1
San Jose, California
Is there a message/signal that is sent out when Windows Mobile is about to die due to lack of power? Because twice now, while hiking and while on the tread mill, my phone happened to be on it's last legs WRT power, unknown to me. In the middle of the workout/hike the phone died due to lack of power thus losing the progress so far. Could pedometer instead be notified of pending death of the phone due to power and "save itself"
before all power is gone?

Either that or how about a resume feature where ever minute (5 minutes or whatever) pedometer saves the current progress such that if the phone died for any reason and pedometer was restarted, it would sense that it was in the middle of a recording and offer to resume where it left off of start anew.

It seems to me that either solution would solve my problem.
 

lightsailpro

Senior Member
Apr 16, 2006
90
0
Is there a message/signal that is sent out when Windows Mobile is about to die due to lack of power? Because twice now, while hiking and while on the tread mill, my phone happened to be on it's last legs WRT power, unknown to me. In the middle of the workout/hike the phone died due to lack of power thus losing the progress so far. Could pedometer instead be notified of pending death of the phone due to power and "save itself"
before all power is gone?

Either that or how about a resume feature where ever minute (5 minutes or whatever) pedometer saves the current progress such that if the phone died for any reason and pedometer was restarted, it would sense that it was in the middle of a recording and offer to resume where it left off of start anew.

It seems to me that either solution would solve my problem.

In next release, I can add battery alert threshold, play the sound, then, save the progress automatically and allow device to go to standby mode.
 
Last edited:

stpete111

Senior Member
Jun 30, 2005
640
0
Lightsailpro, any plans to make this a GPS-assisted app? I realize that once you introduce GPS, you're taking away from the entire purpose of using the accelerometer to measure actual steps, however, I would love to have an app that I could choose on a given occasion whether it uses acc. to measure steps, or GPS to measure actual distance.

Currently, I run with my Diamond (for music) and a GPS watch (to track my progress and calories). How great it would be to ditch the watch and combine all the functionality into the Diamond!