This would be trivial to do with the Raspberry Pi and Perl. Most motion sensors are single-wire (well, V+, V- and feed), so just a single GPIO pin. Here's a quick example with a mix of real and pseudo:
use warnings; use strict; use RPi::WiringPi; my $pi = RPi::WiringPi->new; my $pin = $pi->pin(27); # GPIO pin 27 my $count; while (1){ # check if time >= 0900 here # ...if not, sleep and next my $motion = 0; for (0..10){ if ($pin->read == 1){ $motion = 1; last; } sleep 5; } $count++ if ! $motion; if ($count >= 3){ # 0915 hrs and no movement # send email, sound an alarm etc ... } sleep 300; }
In reply to Re^2: using Skype
by stevieb
in thread using Skype
by louhevly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |