Avatar for BenJabituya

BenJabituya

Member since Dec 2020 • Last active Apr 2021
  • 5 conversations
  • 22 comments

hardware hacking hobbyist, projects vary wildly at times but mainly concern biofeedback/health and game dev

Most recent activity

  • in Interfacing
    Avatar for BenJabituya

    Interesting project, I have a Muse S headband, which seems to work well for sleep tracking and brainwave data. On the subject of tracking sleep and general hypnogram cycles I do think indirect data points such as changes in heartrate and movement provide decent info when I benchmark against the Muse - it's not 100% of course but I find it's more practical for regular use. I've been working on a sleeptracker for the Bangle.JS that takes HRM data and movement to attempt charting sleep cycles, it wouldn't take all that much more to put in a smart alarm feature as well as possibly a REM alarm in theory - REM and wakefulness would be towards the peaks of these cycles so you just need to detect peaks and trigger an alarm soon after the descent.

    A REM alarm on this would probably need to be via bluetooth to another device as the sound wouldn't be loud enough on the Bangle, and I suspect the motor wouldn't have much effect because of sleep paralysis in REM.

  • in Bangle.js
    Avatar for BenJabituya

    Hope your new watch works ok when you get it, FYI on the HRM data exporter app specifically, the -2 doesn't relate to your heartrate directly but the signal from the sensor so it should oscillate somewhere between I think -4 and 4 in normal situations, so your log does look bad but only because it doesn't fluctuate much rather than there being low numbers. Sometimes with mine I do have to adjust the position etc to get good readings at times and it can be sensitive to movement.

  • in Projects
    Avatar for BenJabituya

    Hi, some of the code in that should help yes, you can also look at the hrm data exporter, which records the raw signal over a defined time period: https://banglejs.com/apps/#hrm%20data

    There is a link in the readme file for that to some more signal processing stuff on my github to process the exported file, that might be a good start point also.

  • in Bangle.js
    Avatar for BenJabituya

    @DrBard yep that's basiscally it. BTW there's actually another app that does specific sun and moon calcs which you might want to look at also: https://banglejs.com/apps/#astroc

    I'm not getting correct metrics from that app though but again I think it's just because of the acos issue; I've actually found a better function for that now than the one I gave before (Don't know what voodoo magic they do to work these out!): https://developer.download.nvidia.com/cg­/acos.html

  • in Bangle.js
    Avatar for BenJabituya

    @DrBard should be there in the next few days once it's gone through all the checks etc. You can get it directly from my repo in the meantime also:
    https://jabituyaben.github.io/BangleApps­/#astral
    I've not put the ISS aspect in because I need to think about which API to use, it might work better as a seperate app because this one is already trying to do a lot.

  • in Bangle.js
    Avatar for BenJabituya

    @DrBard One thing to watch out for is the acos part, which is one of the last calculations you have to do - there is an issue in the Bangle firmware with that function on negative values and you'll get strange results. There are several ways to estimate acos you can find online and I've used one of those for now myself and it's close enough for this kind of thing. It's a known issue but fairly new so fixed for Espruino but it's not in the latest standard Bangle firmware.

    function acos_estimate(x) {

    return (-0.69813170079773212 * x * x - 0.87266462599716477) * x + 1.5707963267948966;
    

    }

  • in Bangle.js
    Avatar for BenJabituya

    @Robin Just seeing if there’s a way to do it for any location without downloading and uploading files to the watch-I can do it that way for now tho, probably is best way actually. Just means users will need to use separate apps to generate the JSON each month or so and copy the file over which the bangle can look for. The clock app actually stores lat and Lon in its own json so I can make a python script or something that uses that to make it easier.

  • in Bangle.js
    Avatar for BenJabituya

    Did anyone get round to doing this ISS stuff? pretty interesting. I was looking around the forum for astronomy related projects - I've put together a Clock that calculates planet and sun positions (Alt/Az) based on GPS, will be putting it in the App Loader in the next week once I've sorted a couple things. It doesn't need to interface with any API etc and so I think it's possible to include a spot the station feature with a few more steps. For IIS you'd need to calculate when it's over the horizon, whether it's night time locally and if the Sun is at the right angle as light has to be reflected off it to be visible. The last part in all that carries most of the heavy calculation I think and this clock goes part way for it. The thing with ISS is that it's orbit drifts back and forth and they adjust it with boost so for any projected trajectories calculated - I don't know how long the results would be accurate for so will need to look into that. Worst case though, a settings file could be exposed to kind of reset the projection and orbit every now and then if needed, similar to winding dates at the end of the month on analog watches...this is obvs over the top by comparison and also why it must be done :p

    https://eol.jsc.nasa.gov/Tools/orbitTuto­rial.htm

  • in Bangle.js
    Avatar for BenJabituya

    @Gordon cheers! I had an inconsistant name for the app ID and I think the img name so once I updated the json it's sorted

Actions