mikkah33
Posts: 4
Joined: Thu Jan 02, 2014 10:31 pm
Location: Netherlands

Door sensor / alarm

Thu Jan 02, 2014 11:10 pm

f
Last edited by mikkah33 on Tue Sep 29, 2015 9:24 am, edited 1 time in total.

User avatar
joan
Posts: 14177
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Door sensor / alarm

Thu Jan 02, 2014 11:17 pm

Yes, it is all possible and not particularly difficult.

Have a look through the free MagPi magazine to get some ideas.

http://www.themagpi.com/

mikkah33
Posts: 4
Joined: Thu Jan 02, 2014 10:31 pm
Location: Netherlands

Re: Door sensor / alarm

Thu Jan 02, 2014 11:21 pm

f
Last edited by mikkah33 on Tue Sep 29, 2015 9:24 am, edited 1 time in total.

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Door sensor / alarm

Thu Jan 02, 2014 11:52 pm

Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

mikkah33
Posts: 4
Joined: Thu Jan 02, 2014 10:31 pm
Location: Netherlands

Re: Door sensor / alarm

Fri Jan 03, 2014 12:01 pm

d
Last edited by mikkah33 on Tue Sep 29, 2015 9:24 am, edited 1 time in total.

mikkah33
Posts: 4
Joined: Thu Jan 02, 2014 10:31 pm
Location: Netherlands

Re: Door sensor / alarm

Fri Jan 03, 2014 4:20 pm

g
Last edited by mikkah33 on Tue Sep 29, 2015 9:23 am, edited 1 time in total.

Tarcas
Posts: 740
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Door sensor / alarm

Fri Jan 24, 2014 9:36 pm

So all you want is for what you've got to repeat? Just put it in a loop that continues forever. I'm not very familiar with Python, but you can google "Python loops" as easily as I can to find the syntax.
You'll probably want it inside your Try block. That way if it gets an interrupt, it breaks right out of the loop and exits.
Have fun!

GroverPenman
Posts: 1
Joined: Sun Jan 26, 2014 7:30 am

Re: Door sensor / alarm

Sun Jan 26, 2014 7:32 am

If do not want the students listen to the radios instead of pay more attention to their studies and what their teachers are teaching then using the vip jammer is a helpful method.

boyoh
Posts: 1314
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Door sensor / alarm

Sun Jan 26, 2014 5:05 pm

3.3v------( 10KR)-------GPIO I/P-------( C I/R Receiver E )------0v-

5v+--( N/C Door Switch )---( 270R ) ( A I/R Transmitter C )-----0v-

Will this opto Isolator do the practical side of your Project'

1. Door closed Gpio I/P will receive a Active 0 ( low )

2. Door open GPIO I/P will receive a Active 1 ( high )

Recommend the door switch be a Magnetic Reed switch
Less prone to contact bounce

The 10KR is a pull Up Resistor

I might be wrong.....Boyoh
Last edited by boyoh on Sun Jan 26, 2014 10:38 pm, edited 1 time in total.
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

ThomasS
Posts: 118
Joined: Thu Jan 23, 2014 7:05 pm
Location: Leeds
Contact: Website

Re: Door sensor / alarm

Sun Jan 26, 2014 7:10 pm

This may not be what you are looking for, but as an early electronics project I made a pressure pad attached to the Pi. It wasn't very difficult at all electronics wise, I just had a plastic box lid which pushed down a DVD case when stepped on :D . The DVD just rested on a push button. It used just three pins, ground, 3.3v constant and a GPIO pin. More recently, I updated it to post to a web server and send email alerts, without much difficulty. All the electronics you need are available on Amazon here http://www.amazon.co.uk/Electronic-Star ... B0082LD2B8 (I used a Raspberry Pi Electornic Starter Kit A from SK Pang), and if you need any assistance I can give you some advice. I used the Raspberry Pi Guy's tutorials and the Raspberry Pi Low-Level peripherals page to get me started.
ThomasS

Return to “Automation, sensing and robotics”