Detecting human presence
In this section, we will explore some methods of detecting human presence. It's useful to deliver optimized ad content with information about the number of people watching a monitor. We can configure TV/monitor to go to sleep when there are no people in the area.
PIR motion sensor
A Passive Infrared Detection (PIR) motion sensor is used to detect object movement. We can use this sensor to detect human presence. You can find PIR sensors at SeeedStudio (https://www.seeedstudio.com/PIR-Motion-Sensor-Large-Lens-version-p-1976.html), Adafruit (https://www.adafruit.com/product/189), and SparkFun (https://www.sparkfun.com/products/13285). A PIR motion sensor usually has three pins: VCC, GND, and OUT. The OUT pin is the digital output; if we get value 1, it means motion is detected.
You can see the PIR sensor from SeeedStudio here:

There's another PIR motion sensor from SparkFun, the SparkFun OpenPIR: https://www.sparkfun.com/products/13968. This sensor provides analog output...