Here’s a quick post to show off my first project using the LED canvas I have been working on (nicknamed Square Wave). It’s based on the old snake game, where the player controls a snake that slithers around looking for apples that appear and disappear. When he finds (and eats) an apple, he grows. When he crashes into himself, he dies.

Code
The code is open source, and you can find it on github.

Controller
I’m using a wii nunchuck as a controller, which is a cheap way to get 2 buttons, a joystick, and a 3-axis accelerometer, all in a molded case. For this game, only the right & left directions on the joystick are needed, but the controller has a lot of potential for future games.

5 Responses to “Snake Attack!”

  1. look at https://github.com/neophob/PixelController – I also like pixel modules .. cheers

  2. Just tried compiling this after downloading it from github, it seems to error out indicating multiple definitions for the functions. Are you able to compile this without any problems?

  3. Scratch that comment, I just did something dumb, it compiles fine!

  4. What pins are you using for the numchuk, and are you powering it off the Arduino or seperately with 5 volts?

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

© 2012 Techspeak Suffusion theme by Sayontan Sinha