I’m a pretty big fan of Duck …">

Duck Hunt, Mini

I cannot paint to save my
life.

I’m a pretty big fan of Duck Hunt. I remember going over to a friend’s house down the street when I was five and being totally enamored by the idea of using an actual object (the NES Zapper) to play a video game on a screen. That was some pretty crazy high tech stuff back then. My little-kid mind was intensely amazed.

For my Gadgets project, we were given an 8x8 LED matrix and an Arduino Nano and told to make a game. So, I made Duck Hunt. I took a photoresistor, built an (admittedly terribly-painted) NES Zapper replica out of balsa wood, and wired it up with the matrix, a button, and the Arduino, running this code. Basically, the way this game (and the original Zapper) works is through a light sensor making two different readings of the screen. In the first reading, the entire screen is either on or off, to establish a baseline reading. In the second, it turns it all on or off again, except for the pixels which represent the “target”. If there’s a difference between the first and second reading, you’ve hit the duck. There’s a pretty good explanation of the whole process here.

This was my first big Arduino project (big meaning: anything that’s not basically turning a light on or off based on one other sensor), so the code probably looks terrible to anyone who’s spent a lot of time doing embedded systems. I’m a noob, I’ll admit it :). But it was definitely lots of fun to put this whole thing together, and see something that I built from components actually working.

My version runs through two modes. The first has just one duck, the second has two. I tried to do the Duck Hunt dog at the end (you know, the one that would mock you when you sucked at the game), but it ended up mostly looking like an alien cause 64 pixels is surprisingly little to work with. Oh well. Enjoy this video of me playing, and please tell me what you think!