Introduction: Earth & Moon Magic Mirror

About: 3D printing and designing RaspberryPI projects for a few years now

Tablet Powered Magic Mirror Clock showing the Moon / Earth and current outside conditions.

Step 1: Installation

Clone the project on a LAMP enabled webserver, (PHP/Apache).

$ cd /var/www

$ git clone https://github.com/khinds10/MoonClock.git

Apache2 Configuration File

ServerName moon.myserver.com
ServerAlias moon.myserver.com
ServerAdmin admin@moon.myserver.com
DocumentRoot /var/www/MoonClock
Options FollowSymLinks
AllowOverride All
Require all granted


Configure Application Settings

In the settings/ folder of the project copy the settings.shadow.php to settings.php, adjust the php values accordingly to match your local configuration.

// weather API
$weatherAPIURL = 'http://api.forecast.io/';
$weatherAPIKey = 'MY API KEY HERE';
$latitude = '42.512000';
$longitude = '-71.151510';

Special Feature

If you wish to have your temperatures color coded, more red for hot outside, more blue for cold outside, you can create and point this application at the following GitHub URL: https://github.com/khinds10/TemperatureAPI and assign the newly created URL to the following PHP value

// temperature color API
$temperatureColorAPI = 'http://my-temperature.api.net';

Step 2: Supplies Needed

1) Old Tablet

2) Picture frame large enough to surround the tablet completely inside

3) 2 Way Mirror size cut to fit the frame

4) Thin piece of wood, cut to the same HxW of the picture frame itself. This will be attached to the back of the entire picture frame, holding the tablet inside like it's inside of a thin box.

Step 3: Constructing the Project

For good measure, paint the back panel (thin piece of wood) of the picture frame black to prevent it showing through the 2 way mirror.

Place the 2 way mirror in front of the tablet, I've placed a paint stick (also painted black on the front) to hold up the tablet screen higher in the frame to appear more centered.

Step 4: FINISHING STEPS

On the tablet itself install a "kiosk style" browser application, one that's meant to keep the same page displayed for long periods of time. It should also keep the screen on, so it doesn't turn off due to inactivity when it's inside the frame.

Point the kiosk browser app to your created new website above.

Screw the back panel (thin piece of wood) on the painting, Hang on the wall with USB power nearby.