A homemade smart mirror.
The first mirror was on my wall a full year and got used every day. There were two issues I wanted to fix when building a new mirror:
- Deeper blacks. The original screen was an IPS LCD gave off a faint glow if the room was dark. An AMOLED screen would be better.
- Glass mirror. Plexiglass 2-way mirrors are wavy and don't work well as a dressing mirror. Plexiglass also shouldn't be cleaned with ammonia (Windex).
Here's what I used to build the new mirror:
- An Android tablet, Galaxy Tab S2. This has an AMOLED display which has much deeper blacks.
- An upgraded weather/time webpage, index.html. This now displays the current weather and the forecast in ~10 hours. This is more useful day-to-day (e.g., when getting ready in the morning) than a 2-day high/low.
- An app to show the webpage, app/Dashboard.
- A 16" x 48" glass two-way mirror from twowaymirrors.com ($250).
- A 16" x 48" OEM2-21 frame from framing4yourself.com ($63).
- Black foam board from Blick art supply ($10).
- Black construction paper, taped behind the mirror for an even background.
This was a smart mirror built from:
-
An Android phone, Nexus 5X.
-
A weather/time webpage, index.html.
-
An app to show the webpage, app/Dashboard.
-
A acrylic 2-way mirror from TAP plastics. (30cm x 60cm out of the surplus bin, $30)
-
Black construction paper, taped behind the mirror for an even background.
Credit to Becky Stern's article for the idea.
-
There are not many good examples of how to print English ordinals (1st, 2nd, etc). Here's a nice way to print ordinals in javascript:
// Return the English ordinal for a number. function ordinal(number) { // The general pattern: // number ends in 1 -> st (e.g., 31st) // number ends in 2 -> nd (e.g., 32nd) // number ends in 3 -> rd (e.g., 33rd) // 11, 12, and 13 are exceptions and just use 'th'. switch(number % 10) { case(1): if (number % 100 == 11) { break; } else { return 'st' }; case(2): if (number % 100 == 12) { break; } else { return 'nd' }; case(3): if (number % 100 == 13) { break; } else { return 'rd' }; } return 'th'; }
-
The front-facing camera, now taped over, works well from behind the mirror. This could be useful as an art display (maybe an infinite mirror) that responds to the environment.
-
The Nexus 5X's IPS LCD panel seems happy to display a static page without burn-in or heat issues. Before starting the project I did a test of a static image at max brightness for a week and couldn't notice any problems. After 1 year of continuous use, the Nexus 5X's screen still looks brand new.