jlennox / HeartRate

Bluetooth heart rate monitor
MIT License
109 stars 35 forks source link

Is it possible to get calories burnt display? #12

Open alejandrade opened 4 years ago

alejandrade commented 4 years ago

Using an eform or maybe a property in settings you could ask gender and weight to get a fairly accurate calories burnt. Would need a timer and a reset button for timer. But that would be really cool.

I would add it my self but I haven't coded in cs in years. Do you have some kind of documentation to get this projection running locally to contribute?

jlennox commented 4 years ago

@alejandrade It should be as simple as installing Visual Studio then double clicking the .csproj file. You can then run it with the debugger attached or compile from inside the IDE.

jlennox commented 4 years ago

How do you imagine this displaying on the UI? A second row that says "Calories: {N}" ?

alejandrade commented 4 years ago

You would need to display a timer too for the calculation to make sense.

So it be like

64 bpm 243 cal 00:16:32.

Be honest with you, I was going to fork your code and make it a web service so I can put a web UI around it and change it up for my use case.

alejandrade commented 4 years ago

With a Json payload containing the heart rate only

jlennox commented 4 years ago

Be honest with you, I was going to fork your code and make it a web service

You're of course welcome to :) And I can assist you as needed.

Hive8 commented 3 years ago

Did this feature ever get implemented a JSON service, that be great on a local host, make a webpage and style it as you need?

jlennox commented 3 years ago

@Hive8 There's no JSON service but that's not an unreasonable thing to implement. How do you imagine it would work? Just a socket that does {json's byte length}{utf8 encoded json} per tick?

Calories burnt was never implemented. I'm not sure what the formula is and haven't researched it.

Hive8 commented 3 years ago

Not so interested in the calories burned, more so in the heartbeats. Idea is that for streamers they can run a local webserver, node.js or whatever and be able to load the heartbeats in a local webpage. to make widgets or style them would be really easy, as long the data can be consumed. XML file would work too?

Maybe running a node.js server on a certain port that serves a html file that can be styled or modified.

jlennox commented 3 years ago

@Hive8 There is currently a CSV file that others have externally consumed in real time -- if that helps.

Hive8 commented 3 years ago

I actually did just that, yesterday i changed the source code to FileMode.Truncate in the WriteLine function instead Append and it got me the result i wanted.