Read the statement by Michael Teeuw here.
Magic Mirror & Body Breaking Sensors
-
Hello everyone,
I am wondering if there is a module that allows the magic mirror to interact with body break sensors. My idea is to have a program that runs on the mirror that is also hooked up to these sensors to detect and display when the sensor is broken. My hope for it is to have it while working out for squats hit depth with your hips as well as holding it at depth. I would also like for it to display sets and reps or how many times the sensor was broken and display that on the screen as well.
This would be more of a built in fitness tracker for squats (or other exercises) that tracks reps/sets, time the sensor is broken (or holding the movement) and the exercise chosen.
Any help would be amazing I am really stuck on how to code it!!
-
@silky what is a ‘body break sensor’? never heard of
google doesn’t return any useful results
-
@sdetweil Its just an IR sensor that has an output and input for the IR laser and once the connection is broken between the the two (by an object) it is detected. Garage doors use this to detect if anything is in the way. The reason I call it a “body break sensor” is because usually business use these to detect how much traffic is coming in and out of their business. Was wanting to use the same concept but for what I said in the original post!
-
@silky ok, got it… so, what is the problem?
is there some python code that can read the sensor connected to the gpio pins?
typically in MM us have a node_helper .js which lanuches a pythin script, which runs forever ans prints out ‘connected’ or ‘not connected’.
then the lanucher code in helper (uses spawn) has handler to react to the print
stdout.on('data, (print_content)=> { // some function code to to // maybe send event up to module to handle this.sendSocketNotification(sensor_event, print_content) })