My original idea was to trigger a event if a door was open or closed. Depending on the event this would determine if a sketch would be played. So who should I impress with this idea ? Well Jim the cat is receiving a tent this weekend and I know she loves to follow the cursor on my laptop. As most cats she loves to lay on my keyboard and does not care if I cannot work. I talked to her about the design and this is her reaction.
Not to worry Jim. I know she might enjoy Optical Illusions from processing when she enters her tent. But now to the more technical challenges.
I am using Enocean Pi to sense if a door has been opened or closed. I also installed FHEM for testing. The actuator is a reed or contact sensor. No batteries required or wiring for Enocean sensors. I installed FHEM
sudo apt-get install perl libdevice-serialport-perl libio-socket-ssl-perl libwww-perl
sudo apt-get install -f
wget http://fhem.de/fhem-5.7.deb
sudo dpkg –i fhem-5.7.deb
After some digging I did get the Enocean Pi to appear on FHEM. The link is here.
I have Enocean talking to the Reed Sensor and letting me know if a door is closed or open.
I was also able to add PiFace to FHEM .
The next step is getting processing sketch to activate the processing sketch on the command line in Python. The install steps can be found here.
I downloaded processing.py-linus64.tgz on my laptop and transferred the file to the Pi using Pizilla. From the instructions I set up a simple script to see if I could run it at the command line:
mouse_follow.py
def setup():
size(400, 400)
def draw():
background(255)
fill(0)
ellipse(mouseX, mouseY, 50, 50)
Top Comments