-
Notifications
You must be signed in to change notification settings - Fork 66
HOWTO PIR SENSOR
Pir sensor is a device that detect human presence.
A value is sent to arduino periodically.
Useful to wake up the robot or launch face detection/recognition. Or what you want.
ELECTRONIC
SETUP
Open C_pir.config Inside services folder and setup like this :
[MAIN]
isPirActivated=1
;witch arduino control pir :
PirControlerArduino=right
[TWEAK]
;5 minutes after presence detected
HumanPresenceTimeout=300000
To check if pir worky, launch the program and check values Inside the black box
You can use analog oscope from webgui too
UTILISATION
By default "sleeping" action is sent after 5 minutes of humain inactivity
If the robot is sleeping and if human is detected, "wakeup" action is sent.
file C_pir.py :
if pins[pin].value>0:
if not RobotIsSleeping:
humanDetected()
if RobotIsSleeping:
sleepModeWakeUp()