My daughter is ten and suffered a stroke a few months ago. Because of the stroke, she has a lot of tone in her arm. This causes her arm to pull up close to her body instead of naturally resting down and at her side. She has to make a conscience effort to put her arm down and we are frequently reminding her. School is starting soon and I started thinking if there is a way to use the Pebble’s accelerometer and vibrate feature to provide reminders that are more subtle. Could the Pebble detect if her arm is in the upright position (right side of watch facing up) for let’s say 30 seconds and trigger a notification vibration? Is this even possible?
It’s a very simple feature, as i have something similar running, and I can add it to my watchface.
Would anyone be willing to help me with this?
Hey Dale, try this:
Dale, if your daughter enjoys any of my watchfaces here: http://www.edwinfinch.com/pebble/, please tell me which one and I can make a custom version for you that reminds her to put her arm down.
We truly have some really great people in this community. Good work guys. It warms my heart seeing you guys jump right in and offer assistance like this. Hats off to all of you.
Can you describe the angle of the hand? I guess it’s not exactly straight Up.
Ron said:Can you describe the angle of the hand? I guess it's not exactly straight Up.
Wouldn’t be more flexible to implement a “learning mode” in the watchapp/face;
I’ve been working on learning mode for some time. It’s not ready, and I have few other bog tasks with priority.
One simple way to answer the position question is to record real movement with one of the dedicated applications like my acc_log. It’s data are available to the user who record with it.
Alright, let’s all gather together then and make one awesome app for Dale here. I will merge @orviwan’s code for the detection in a few minutes when I hop on a computer. (code has been merged) I will provide the github repo, my code for BOLD (the watchface his daughter likes), and any other side code or assistance that needs handling. @Ron and @LeFauve can provide the learning code.
Well done @Magnitude!
@Magnitude This is excellent!
@LeFauve that’s helpful advice. Fortunately she likes the look of the normal Pebble over the Steel. Good for Dad because we save $100. Plus she likes the bright color options.
I finished 1.1. I changed it from a watchface to a watchapp to allow for button interaction. I overrode the back button so it’s not accidentally hit and the app is exited. To exit the app, long press the back button for about 3 seconds. Press the select button to show the stats screen. It looks like this:
This works great! We’ve been doing some practical testing today. It seems to be making a difference.
This is just great Dale, please keep us updated on her progress. Wish her luck in school from me!
Dale said:This works great! We've been doing some practical testing today. It seems to be making a difference.I remove the '&& data[i].y>=600' condition so it would trigger when her arm was in the upright position. Y stays below 100. Just tracking the X seems to work fine.We're still getting a vibe after she puts her arm back down. This started after the vibe lock feature was added. She doesn't mind. She says it's the 'good job' vibe.
Glad it’s working! Hoping the best for her in school, as well.
Great work Magnitude, i was busy with adding an learning button based on V1.0.
When you push the middle button for 2 seconds, then it wil take the actual position for X and Y.
The Pebble will give a short vibe to let you know the new positions are learned.
These values for X and Y are also stored in the pebble, so it will use these from start-up next time.
I did not knew that you where making a new version, otherwise i had add this to V1.1.
I will attach a link to the source, so you can have a look and maybe you can add this to your project.
In my example i only use X to detect the position of the arm, but X and Y are learned (in case of needed).
I also used a different font and BT_Icon because that was missing at the time i looked in the git.
It’s great you do this, much appreciated !!