Hardware Reference
In-Depth Information
3. In this example, we assumed that the lights will be turned on between the selected
ime slots. It is also possible to turn on the lights by determining the sunset ime.
NOAA provides informaion on calculaing sunset imes, which i s available at
http://www.esrl.noaa.gov/gmd/grad/solcalc/c alcdetails.html .
4. Another alternaive to turning/of lighing appliances—it would be a great idea to
make coffee everyday using PowerSwitch Tail 2. If the coffee maker is filled with
water and the coffee pods/filter are replaced, the coffee maker will be turned on at
the chosen ime! We will have our cofee ready right ater geing out of bed.
PowerSwitch Tail 2 is designed for resistive loads and especially for
limited use. Do not try to use it with heavy inductive loads such
as a motor. This tool is strictly recommended for those who are
knowledgeable with the fundamentals of electrical engineering.
A customary web server example
Any home automaion project using Raspberry Pi yields a lot of examples that involves
building a web server that controls appliances within a local network that takes care of
securing the place using electromechanical locks. We will build a simple web server that
can be used to turn off an LED from a web page. This concept can be expanded to control
muliple appliances and read sensor data from the GPIO interface of Raspberry Pi.
This task is meant for absolute beginners who are not familiar
with Python web framework tools. We are discussing this
example considering some readers might jump right to Project
11 , Home Automaion Using Raspberry Pi .
Prepare for lift off
We will be building a web server using a Flask framework ( http:// flask.pocoo.org/ ).
The Flask framework can be installed as follows:
sudo apt-get install python-pip
sudo pip install Flask
 
Search WWH ::




Custom Search