Raspberry Pi magnet lamps

by Viktor Hansson on 16 November 2014, 19:19

Tags: rpiremote

After a long wait for the magnet switch I ordered from ebay I took a little time today to try it out. After fighting my way out of dependency hell regarding python/rpi.gpio/pip I managed to produce a simple little script which sends an http request to my rpiremote system and switches on a lamp when the magnet approaches and switches it off once the magnet is removed. 

I intend to use this in a little more sophisticated way to turn on the lamps in my bedroom (where I keep my clothes) in the morning when I get up. I already have the lamps outside the bedroom set up to turn on when my alarm clock rings, but since I get up at different times every morning I can't have the lamps inside my bedroom on a timer, hence the magnet contact on the door.

1

About Me

This is my personal blog where I might write some interesting stuff. I have some examples of 3D javascript/webgl things in the works which should be done in the comming months, so be sure to return somewhat regularely.

Featured

Internet Cryptography Series

See also...

Blankycan
Terali
Andréas Söderberg