Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
iver56 committed Jun 8, 2015
1 parent 8e37d44 commit 37fc1bd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ GPIO.cleanup()

## Detect humans
Next, you should decide how you're going to detect a human standing still in front of the mirror. I use an OMRON D6T MEMS Thermal Sensor for this. It actually senses the weak heat radiation coming from the human body, so it even works in the dark. Finally, write the sophisticated code that takes input from the sensor, processes it and wisely decides when the light should be on and when it should be off. I have some logic that decides when there's a human standing still in front of the mirror. In other words, the light does not turn on if somebody is moving, because somebody that just moves past the mirror does not need the mirror light. It would actually be just annoying and distracting if it would turn on when it should not. Also, in order to avoid blinking, I decide that I leave the light on for at least 2 seconds after the last time a human standing still in front of the mirror was detected.

## Run script at startup
Run `sudo crontab -e`

Add a line like this:
`@reboot python /home/pi/auto-light/read_thermal.py`

0 comments on commit 37fc1bd

Please sign in to comment.