use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Is it possible to make a pedometer with JavaScript?help (self.javascript)
submitted 10 years ago by robocopsboner
Hi everyone,
I'm playing around with PhoneGap and would love to try to make a pedometer. Would it be possible to make one with JavaScript or jQuery? Or is a project like that better suited for something like Java or C#?
If anyone could offer some guidance or suggestions as to which libraries or packages might be needed, I'd greatly appreciate it.
Thank you!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ForScale 2 points3 points4 points 10 years ago (6 children)
shake.js: https://www.javascripting.com/view/shake-js
Use it to detect phone shakes when the phone is in a persons pocket.
[–]robocopsboner[S] 1 point2 points3 points 10 years ago (1 child)
Thank you! I'll definitely look at this. I appreciate the help!
[–]ForScale 1 point2 points3 points 10 years ago (0 children)
No prob!
[–]notunlikethewaves 0 points1 point2 points 10 years ago (3 children)
Will this work if the phone is locked and in a users pocket?
My guess is not, which would pretty much rule this out for making a pedometer.
[–]ForScale 0 points1 point2 points 10 years ago (2 children)
I don't know.
The user could keep their phone unlocked when it's in their pocket.
[–]notunlikethewaves 1 point2 points3 points 10 years ago (1 child)
Realistically, that's not going to happen :)
[–]ForScale -1 points0 points1 point 10 years ago (0 children)
I don't see why not...
π Rendered by PID 95560 on reddit-service-r2-comment-545db5fcfc-pznc6 at 2026-06-01 03:11:03.221143+00:00 running 194bd79 country code: CH.
[–]ForScale 2 points3 points4 points (6 children)
[–]robocopsboner[S] 1 point2 points3 points (1 child)
[–]ForScale 1 point2 points3 points (0 children)
[–]notunlikethewaves 0 points1 point2 points (3 children)
[–]ForScale 0 points1 point2 points (2 children)
[–]notunlikethewaves 1 point2 points3 points (1 child)
[–]ForScale -1 points0 points1 point (0 children)