Closed danielccm closed 7 years ago
It should be possible, but it would be more of a OS-hack than a NodeJS hack, I believe.
Also make sure you test if it works through the mirror glass.
Since this requires additional hardware to function we may not want to add it. I don't think we want the mirror to be prohibitively expensive or tricky to get working.
That said I think this is a great idea. You should take a crack at it. If it ends up being super simple or optionally can run independently from the mirror then I'd be happy to merge it in.
Hey Evan!
For the cost or difficulty, I doubt it'll be too much... it's just a small piece which logic tells me should be attachable to the I/O ports of the raspberry... just a breadboard and some resistors needed... nothing too expensive...
I'd be happy to "take a crack at it"... The problem I see is that as of right now, I don't know how to code! Last time I coded something was back in the 90's in C++......
If you or someone here could help update me.... lol!
UPDATE:
I found this:
http://www.modmypi.com/blog/hc-sr04-ultrasonic-range-sensor-on-the-raspberry-pi http://thejackalofjavascript.com/rpi-an-ultrasonic-sensor-measure-distances/
Might be useful?
@danielccm I'm actually in the process of adding the HC-SR501 to the code somehow... Sadly I'm not all to good with Nodejs/Js myself and it's hasn't arrived yet but i'll give it a shot as soon as it has. Some code for the SR501 already exists for node, so I don't think implementing it should be too hard. https://www.adafruit.com/products/189
I've got a SR04 sensor laying around at home.. I could test it out for you!
You could use an IR sensor and use onoff to interact with the ports: https://www.npmjs.com/package/onoff
you could attempt to set it that when you're not in front of the ultrasonic sensor it activates a screensaver
If PIR sensor is used, the mirror can also have something like "Alarm Mode". When the mirror is set into this mode, it would take a picture and notify "admin" every time it detects presence in front of it.
Migrated to http://feathub.com/evancohen/smart-mirror/+12
Issue will be closed and tracked on feathub moving forward. Please refer to feathub for all future comments on this suggestion.
I've got a SR04 ultrasonic sensor.. I could try the code if someone does it....
The idea would be, have the screen off except if it senses someone in front?