Remember this old thing? As a final group project, we rebuilt my botched attempt at a smart mirror, with actual test-driven development this time round.
The idea is that the mirror is a self-contained product, capable of running a server on itself and displaying an interface with widgets. A user would connect the mirror to their wifi network and configure the widgets externally from a phone or computer on the same network, similar to the configuration of a router.
The personalisation dashboard has a grid that represents the available positions of a widget on the interface. In the example below, the clock widget would appear in the top left corner of the mirror interface. The widget blocks can be toggled on/off and moved around by dragging and dropping into position on the grid.
One of the challenges was to somehow get the mirror interface to update itself when a user changed the dashboard settings, as there aren’t any touch-screen capabilities (but think of the smudges if there were, shudder). As the settings were saved to disk in a
json file, I used BrowserSync to listen to changes on that particular file, then force a refresh of the mirror interface without user intervention. Voilá, a self-updating smart mirror.
We also experimented with using a LeapMotion sensor to put the mirror to sleep and wake it up with a swipe gesture, as well as some more advanced widgets like radio alarms that could be snoozed with a different gesture.
Watch the video of the project in progress. Just a warning, there’s a cringeworthy amount of my face in it. I did not make the video
I have no idea what happened to the time after week 6, but it has flown by! In that time, I’ve built a web framework (move aside Express), a convincing clone of Instagram with photo filters, and even a multiplayer game.
One of my favourite group projects has definitely been the multiplayer game. The coaches set a theme of ‘useful tools for developers’, and out of that,
Battletoads BattleCodes was born. It’s a happy mix between CodeWars (improve coding skills by completing challenges) and typeracer (race to type the fastest), where players race in real-time to complete code challenges before their opponents.
The reason I enjoyed this so much was because its a game (yay fun), and because there was the challenge of getting real-time, low-latency responses. HTTP relies on a client sending a request, and then the server responding. In a game where speed is crucial, that just won’t cut the mustard. With websockets, there’s a persistent connection between the client and the server which allows data to be sent and received immediately.
Find the project on Github.
- Week 6 — Project week 1.0
- Week 4 — Chitter, not Twitter
- Week 3 — Rock, Paper, Scissors
- Week 2
- Week 1
- Precourse week 4 — POODR and chill
- Using tags in Jekyll
- Precourse week 3 — Thanks for the memories
- Precourse week 2 — The final countdown
- If we took a holiday, took some time to graduate
- Precourse week 1 — Not just 'how'
- Precourse intro — It begins!
- Why Makers Academy?
- S.M.R.T. (the smart mirror)
- How to AWS, Apache and virtual host
- Hello, it's me