October 15, 2017

Haunted Home Automation

Halloween is one of my favourite holidays of the year. One reason for this is that it's totally optional and low stress. People can get exactly as in to it as they want. I'm also really intrigued by the perseverance of belief that there are supernatural forces at work. No matter how fact based and rational you are, I'd wager you still get a tingling feeling on the back of your neck crossing a cemetery during a wind storm all alone at night.

In other words, even if you don't believe in ghosts, you still end up scared of them anyway. The goofy costumes and haunted houses are just icing on the cake.

My absolutely favourite part of Halloween however is that DIY is deeply ingrained in the traditions. There's pumpkin carving, costume making, haunted houses in a garage, and a lot more.

Naturally as a DIY fan, I've been thinking of how to incorporate technology into a good scare. Home automation has a lot of potential here, and it pairs nicely with the smart mirror in our house. Check out the video below to see what I came up with (with some help)!

Do it Yourself

If you like this effect and want to do it yourself, a good starting point is a smart mirror with Alexa and a custom skill to run scripts. You'll also need some Philips Hue lights.

September 24, 2017

Automated Plant Watering with a Raspberry Pi

This post starts with two facts:

1. I have a penchant for killing plants.
2. People in Holland grow things really well indoors.

After reading about how well things can grow indoors, I started thinking that maybe automation was my path to healthy plants. So I decided to build the bare minimum - get a plant, a pump, and a water sensor. When the water sensor says "no water here", use the pump to put water there.

I also decided to run it all through a Raspberry Pi to as an excuse to interact with the RPi GPIO.

Here's how I did it!

August 19, 2017

Am I Hearing this Right?

 The Lyrics Repetition Analyzer

I have just returned from a two week vacation, which contained a sizeable amount of road tripping. And with every great road trip comes great tunes!

One of the albums I was excited to be listening to was The Arcade Fire's newest release, called Everything Now. It has received some mixed, but I try to keep an open mind.

Upon first listen I actually really liked the album (and will listen many more times), but something stuck out to me. It seemed like several of their songs were just the same couple of words repeated for the whole track. The instrumentals were great, but the lyrics seemed like an after thought in a few songs.

May 28, 2017

Detecting Reddit Vote Manipulation

I'll start this post with a disclaimer. This project has not produced conclusive results. But I'm optimistic! In fact, I've got a couple hurdles that maybe some of the people reading this can help with (which is what I'm hoping for).

So let me describe what I have been working on. This is a python tool with two modes of operation. The first mode of operation looks at a single reddit post, and gathers statistics about the first 5 users to comment. This includes the user karma (average), account age (average),  number of interactions on the subreddit (average), and number of interactions with other commenters in the thread (max, avg max, and average).

March 25, 2017

A Visit to eSight

After working on the All-Seeing Pi, a series of events unfolded such that Dan and I were put in contact with a company called eSight. The founder of eSight had the same inspiration as the All-Seeing Pi many years ago, and has now developed the third generation of a vision assist platform.

So we were invited to come check out their technology, and see how it stacks up to our contraption. For starters, it is a very sleek and lightweight design that looks a little more stylish. It also has some great vision enhancement functionality like contrast boosting, magnification, and screenshots. Using these features, Dan was able to read an eye chart at the "20-30" level, which is better than he was able to see  before he lost his vision!

This hasn't stopped our interest in the All-Seeing Pi though, as eSight comes with a pretty hefty price tag of $10k. An existing commercial solution is never a good reason to stop a DIY project too!

March 01, 2017

The All-Seeing Pi

This post is a about vision enhancement platform called The All-Seeing Pi that I have been working on with my friend Dan, who is blind. People who are blind rarely have no vision at all though, and in Dan's case, he still has a little bit of sight in one eye. He's also the first to tell you how much technology can do to enable mobility.

From these discussions, we came up with the idea for a video feed connected to a display, with a wearable screen in the ideal spot for maximum vision. This allows someone to focus on just the screen, and let the camera capture the detail and depth of the environment.

In the end, the prototype served as a successful proof of concept. Checkout the video above for a field test and some more discussion! Dan also likes to push the limits of what can be done with his disability, which he chronicles at his blog Three Points of Contact.

In the rest of this post, I'll be talking about how to build the device. This may be useful if you or a friend have a similar condition, but it is also a great starting platform for a Raspberry Pi based augmented reality rig. The general setup is a raspberry pi with a camera module running on an HDMI (not SPI!) small display. The video feed is provided via OpenCV and RaspiCam, with code and install details below.

February 17, 2017

February 11, 2017

N-Body Orbit Simulation with Runge-Kutta

In a previous post I introduced a simple orbital simulation program written in python. In that post we simulated orbits by simply taking the location, and velocities of a set of masses, and computed the force on each body. Then we calculated where all the bodies would end up under that force a small time step into the future. This process was repeated over and over again, and was used to simulate gravitational systems like our solar system giving outputs like you see below.

This technique is called the Euler method. If you're not familiar with using numerical methods to simulate orbits, I'd recommend taking a look there first!

Part 1: Python N Body Simulation

Orbit paths from the previous example

In this post I will be adding a more advanced time stepping technique called the Fourth Order Runge-Kutta method. Kids these days just call it RK4. I'll walk through the logic behind RK4, and share a python implementation. I will also link to a C++ implementation, and do a brief performance comparison.

Fourth Order Runge-Kutta