Saturday, November 26, 2011

Arduino based game controller

Being the big fan of technology that I am, I always wanted to try out the latest things happening on the technology world. Some of the buzz words being talked about in the technology world are HTML5 and mobile development. After having fun writing games during my college days, I was interested in building a HTML5 based game. Then, I came across this HTML5 based implementation of classic Helicopter game. In the mean time, I was also playing around with Android ADK and Arduino boards. Finally, made up my mind to hack something cool connecting all these technologies – HTML5, mobile and USB accessories. And, here is the result of the experiment - “Arduino based game controller”. In a nutshell, it’s a game controller which can be connected to an Android phone using which we can play HTML5 games on the browser. The heart of the hack was built over a weekend and source code of the same can be found here. Check out the video demo of the hack at the end of this post.

What is it?

Arduino based game controller is a Joystick / game controller which can be connected to an Android phone via USB.  Using the controller, we can  play games on the browser. An android driver app has been built which reads the data from the game controller (using Android ADK) and routes it to the browser over web sockets. The game has been hosted here (The multi-player mode might not work properly as the hosting site does not support web sockets). More detailed information can be found here.

Arduino Game Controller

The hack consists of three core modules:

1. Game module. HTML5 based Helicopter game originally written by Dale Harvey. The game uses HTML5 canvas for rendering the game elements. I have forked his code and have built the networking layer of the game. I have integrated the game with Node.js and Socket.io to support multi-user mode. In order to facilitate seamless communication between the controller and the game module, web socket technologies have been used.

2. Joystick / Controller module. For this hack, I have used Arduino Mega ADK board and a joystick shield mounted on top of it. Arduino board has been flashed with the firmware which reads analog data from the controller and sends it to the connected Android device using Android accessory protocol.

3. Android module. An android app for linking the game module and the controller. The app can be installed on any device running Android 2.3.4 (Your device needs to have the USB compatibility library). It reads the data from the controller and forwards it to the browser over web sockets.

HTML5 Helicopter game

Arduino Mega ADK board with Joystick shield

Android driver app

How to contribute?

The source code is available here under MIT licence. I have added enough inline documentations all around the code. Please send any bugs, feedback, complaints, patches about the hack to me at varunkumar.n@gmail.com.

-- Varun

Saturday, November 19, 2011

Sitting on the Fence - Locked Gate Artist Riding on the Locked Gate Bike of Indecision

Here is a guy Artist Stephen Williams who took the term "sitting on a fence" literally with his whimsical creation, a bike made from two antique locked gates called "The Locked Gate". Williams admits that even though his masterpieces may be considered brilliant are far from practical but make the most of the funny side of his weird and wonderful imagination. In my opinion life was made just a tad

Friday, November 18, 2011

Bone Art Cars Discovered - The End is Near for the Combustion Engine

The end of fossil fuel will have a devastating effect on the combustion engine and the result will be millions of bone car remains frozen in time only to be discovered many years from now and placed into museums. Archaeologist will study these bone cars and wonder what these creatures looked like and whether or not they were gas or diesel powered. I am talking about these breath taking bone art

Thursday, November 17, 2011

Star Wars Art Car STOLEN!!!!!!

Meerkat Six Star Wars 1981 Jetta Art Car - Rear SideI just got this sad story sent to me by Thomas you had his Star Wars artcar called Meerkat Six, a 1982 Diesel-powered Volkswagen Jetta stolen last May of 2010. He took inspiration from Star Wars Episode III Jedi Starfighter, the X-Wing Fighter, and the Rebel Blockade Runner but later realized that he had chosen the Snowspeeder's color scheme.

Thursday, November 3, 2011

‘Occupy Wall Street’ Protester Art Car for the 99%

It was only a matter of time but we now have an ‘Occupy Wall Street’ Protester Art Car for the 99%. This Acura is completely covered in cartoons of unknown gender and race and speech bubbles that say "99%". Just like the OWS its completely abstract and hard to ascertain the main point, and with that it totally captures the essence of the OWS movement. Wonderful!!!Painted Art Car for the 99%

Tuesday, November 1, 2011

30 Hoop Art Cars of Extreme Awesomeness

Hoop COMMUNICATIONS CAR art carHoop was one of the most colorful and prolific art cartist ever and his passing last September will leave a big giant hole in the art car world. His real name was Stephen Douglas Hooper was a New Jersey-based sculptor was often seen riding his hoop creations around east village and beyond were he became well known. There are simply not enough words to describe Hoop
google-site-verification: googlea4d68ed16ed2eea6.html