Форум обсуждения систем  

Вернуться   Форум обсуждения систем "Умный дом", проектов Ардуино, OpenWRT и других DIY устройств > Форум умного дома > Сделай сам > OpenWRT/LEDE

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 07.01.2013, 21:27   #1
amod-cccp
Senior Member
 
Аватар для amod-cccp
 
Регистрация: 05.01.2013
Адрес: Беларусь
Сообщений: 241
Вес репутации: 634
amod-cccp has a reputation beyond reputeamod-cccp has a reputation beyond reputeamod-cccp has a reputation beyond reputeamod-cccp has a reputation beyond reputeamod-cccp has a reputation beyond reputeamod-cccp has a reputation beyond reputeamod-cccp has a reputation beyond reputeamod-cccp has a reputation beyond reputeamod-cccp has a reputation beyond reputeamod-cccp has a reputation beyond reputeamod-cccp has a reputation beyond repute
По умолчанию Датчик движения на основе отптической мышки

Начитал я тут.

А именно:
Цитата:
OpenWRt can read input from mouse attached, see instructions on H-wrt.com

I connect a PIR motion detector board paralell to mouse button and get
a simple digital input to router. In case of alarm the webcam takes picture.

It took a while to figure out how to use output from
cat /dev/input/event0
I continuously save mouse output to file. And then check if file is empty.
I could not find easier method.


In Ebay bought 5Ч Sensor Melder Module PIR Low Voltage Bewegungsmelder for 12 EUR.
http://cgi.ebay.de/5-Sensor-Melder-M...item3f0c269c6b

opkg install kmod-usb-serial-ftdi kmod-usb-hid

cat /dev/input/event0 | hexdump
cat /dev/input/event0 |hexdump
cat /dev/hiddev0 |hexdump
cat /proc/bus/input/devices
ls /dev/input/ -l


######################################## #
while (true) do

if ps -ef |grep /dev/input/event2 |grep -v grep; then
echo "cat mouse runs"
else echo "starting cat mouse"
cat /dev/input/event2 > /www/test3 &
fi

if [ -s /www/test3 ]; then
echo "alarm"
#/www/webcam/webcamalarm.sh run here code that uploads picture
cat /dev/null > /www/test3
else
echo "quiet"
fi

done
######################################## #
Еще можно почитать:
http://www.xard.ru/post/20224/default.asp
http://imobot.ru/index.php?option=co...id=61&Itemid=9

Может есть другой способ?
amod-cccp вне форума   Ответить с цитированием
 


Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход


Текущее время: 02:19. Часовой пояс GMT +3.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd. Перевод: zCarot
Яндекс.Метрика