06.08.2015 Views

RASPBERRY PI

MagPi36

MagPi36

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

TutorialWALKTHROUGHEVERYDAYENGINEERING PART 6SIMON MONKSimon Monk is the author of theRaspberry Pi Cookbook and Programmingthe Raspberry Pi: Getting Started withPython, among others.simonmonk.orgmonkmakes.com3V3 5VGP2 5VGP3 GNDGP4 GP14GND GP15GP17 GP18GP27 GNDGP22 GP233V3 GP24GP10 GNDGP09 GP25GP11 GP8GND GP7DNC DNCGP5 GNDGP6 GP12GP13 GNDGP19 GP16GP26 GP20GND GP21+ _ + _a b c d e f g h i j123456789101112131415161718192021222324252627282930123456789101112131415161718192021222324252627282930+ _ + _a b c d e f g h i jNeoPixel LED stripSwitch to turn lighton and off andchange colourYou’llNeedMOODLIGHT> Half-sizebreadboard> 0.5m of 60LED/m 5VWS2812B LEDstrip (eBay /Adafruit)> 2× 470Ω resistor> 2N7000 MOSFETtransistor(CPC: SC06951)> Tactile pushswitch> 7× male-tofemalejumperwires> 3× male-to-malejumper wires> DC barrel socketto screw adaptor(CPC: CN19646)> 5V DC @ 3APower supplySolve real-world electronic and engineering problems with your Raspberry Piand the help of renowned technology hacker and author, Simon MonkLED strips can be used both as displays and forlighting projects like this one. They look greatand have a self-adhesive backing that meansthey can be stuck to just about anything. They alsowork well with a Raspberry Pi, requiring just one G<strong>PI</strong>Opin to control them.In this project, 30 LEDs are used to provide lightof different colours. You can change the colour andbrightness of the lamp using a push button, as well asturning the light on and off. A long press of the pushbutton causes the lamp to pick a colour based on thetime of day. So, you can have a nice restful soft orangelight at bedtime to get you in the mood for sleep!As you’ll see from the list of required componentson the left, this project uses a breadboard to provide asolid base for the push switch, and for the transistorand associated resistors that are used to shift thesignal level to the 5V needed by the display.When you are buying your LED strip, make surethat it uses the WS2812B LEDs. They are available ina range of lengths and what’s more, if it’s not thelength you need, then you can just cut some off witha pair of scissors. They are generally available as 30or 60 LEDs per metre. We used 60/m in this project.You can buy generic reels of LED strip on eBay, andAbove The mood light44 August 2015raspberrypi.org/magpi

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!