Tuesday, 9 August 2011

Controlling a snake with your bare hands!

I wanted to play around with accelerometers since I got to know about them! Finally, I bought the TI's Chronos eZ430 watch. I've covered more about the watch in another post.

I've recently been learning Python and this watch also had some libraries written in Python. Thought this would be a good opportunity to get acquainted with both of them!

Already, there are a lot of libraries for the eZ430 available online. So there was absolutely no point in reinventing the wheel! I downloaded a simple yet amazing library from Madox's website and got down to understanding it. Once done with that, I got a sample code of PyGame & modified that.

 I downloaded Pygame and started looking at sample codes on the website. It was pretty easy and I ended up with a simple game of Snake. Yeah, the Snake game you used to find on every Nokia phone.

Catch the live action here and feel free to express your views!!

Here's the code