The Official Raspberry Pi Projects Book - Projects_Book_v4

(singke) #1

Tutorial STEP BY STEP


(^112) The Official Raspberry Pi Projects Book raspberrypi.org/magpi
TEMPERATURE CONTROLLED
STAIRLIGHTS
Give every day a colourful and useful start by displaying the outside
temperature using coloured lights on your stairs
hen you wake up in the morning, wouldn’t
you like to know whether you need to wear
your woolly hat or your sundress? Now you can
find out on your way to breakfast, thanks to Lorraine’s
stairlights project! The Raspberry Pi hidden under the
stairs connects to the web and checks the temperature.
It then controls the strip of 240 lights running up the
stairs. If it’s colder than 0°C, the bottom 35 lights come
on in white; under 5°C, and the next 35 lights light up
in blue; and so on up to 25°C and red, although that
probably won’t happen in Yorkshire, where it was built!



5 V RGB strip (^) W
magpi.cc/
2pzIMyC
5 V mains
power supply
magpi.cc/
mUxjzL
Female jack
connector plug
magpi.cc/
2q9Hfi6
Male-to-female
jumper wires
You’ll
Need
LORRAINE UNDERWOOD
Lorraine runs the Kendal Pi Jam. She is
an Irish maker living in Yorkshire with a
background in web development
@LMcUnderwood
magpi.cc/2ovDD9z
STEP-01
Set up the lights
Firstly, work out which end is which on your RGB
strip. We are looking for the Data In end. It should
be labelled as Din. In this strip there are five cables
coming from three connections: two from GND,
one from Din, and two coming out of 5V.
Connect the 5V wire to the ‘+’ block on the female
jack connector plug by placing the bare wire under
the terminal, then screwing the terminal down with
a screwdriver. Connect the GND wire to the ‘–’ block in
the same way. Pull gently on both wires to check that
they’re connected.
Over 25 degrees in the UK?
Never going to happen...
This is the permanent
springtime temperature
in Yorkshire: less than
ten degrees!
This is the end you're looking for...


Free download pdf