Using the Raspberry Pi as a smart alarm clock

Lead Image © Gennady Kireev, 123RF.com

A Raspberry Pi Sunrise

A Raspberry Pi alarm clock can get you gently out of bed each morning with a simulated LED sunrise and custom alarm tones.

True, you probably don't need to build your own alarm clock, because conventional ones are easy enough to find and buy. However, a Raspberry Pi alarm clock can offer a lot more than a conventional clock. For example, with a Raspberry Pi alarm can choose your own music, design a web front end, and create a simulated sunrise with a color LED strip.

The instructions presented here offer a step-by-step guide for a basic alarm clock setup. The process starts with an LED strip that can be controlled via the PWM controller of the Raspberry Pi. Then, the project deals with the core task of waking you up. Because the PWM controller will be taking care of the LED strip, you need an extra sound card. Additionally, services like MySQL and Apache need to be installed. Finally, a series of small scripts ties everything together into a smart package.

Controlling the LED Strip

A variety of LED strips are available for purchase from hobby stores and online merchants (see the "Suppliers" box). Two major differences distinguish strips. The strips are characterized primarily by the number of LEDs per meter and the type of controller used. The strip I used for this project has more than 60 LEDs per meter and uses the WS2812B integrated LED and driver chip as a controller [1]. Each of the LED elements can be controlled individually and accept 16 million color values. The number of color values derives from combinations of red, green, and blue light, which emanate from three LEDs integrated into each element. The required data is transmitted serially via a special protocol that is dependent on correct timing. The nifty wiringPi library helps set up control of the LEDs via software [2].

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF

Pages: 8

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content