Thursday, 20 August 2015

Control The Ball With Accelerometer

Android Game Development



                Hi Guys, Finally I m able to publish a much awaited game in android platform. This game took me 18 days and nights full on to realize. Of course I got help here and there. My roommate keshav Ladha is a newbie in this field. he gave me hand in designing graphics and and my ex teacher Mr. Sudipta Chatterjee helped in some coding. To tell you guys the truth the simple purpose of this project was to pass the time here in college. The college has been reopened after a two and a half months of leave and  the initial days of the college are filled with intro classes as well as the hullabaloo related to the newcomers' fresher's party, Independence Day Parade and all those stuffs. So i decided to take some time off from the college and dedicated myself in designing a new game. And two and half weeks of hard work finally paid. 
                To be honest, I would like to add here one certain thing. I was involved in embedded systems last to last semesters. I worked in various sensors. In making DIY (Do-It-Yourslef) projects, i used ultra sonic sensors and then some IR sensors. Again for another project I tried my hands on accelerometer but could not properly integrate my Arduino with it. The problem which i faced is that while you work on such sensors, you got to work on so many wires to attach that sometime the hardware cant be properly calibrated. Of course you can make certain good products but you got to work harder in case you don't use a simulator like Proteus or something. What I m trying to do here is I m advocating the importance of knowing how to interface smartphone with your development board like Arduino. Nowadays smartphones come equipped with almost all the sensors we know of. Few months back I wrote an article in this very blog about the smarthome application. That was my first step to learn how to interface a hardware (Arduino) and a software (Android).  Now in order to make this game, i have used accelerometer and with the asme procedure, we can use the smartphones sensor to make our DIY.

                 Coming back to our discussion on the game development, the game which I got published in Play store on the morning of my nation's 69th Independence Anniversay, i.e 15th August, 2015. This game, is about controlling a red ball using the accelerometer control of the phone and avoid its intersection with some given lines and take it to its destination, that is a grey circle. The game can be downloaded from the given link: 
https://play.google.com/store/apps/details?id=com.mayukh.mayukhchakraborty.controlball&hl=en. The code of this project is here,:
https://drive.google.com/file/d/0B-7SqmMCsRSObVE2U2tSQy1BTnM/view?usp=sharing







Saturday, 25 July 2015

Android Game Development: Tik Tak Toe

Get the app from Google Play Store: 

 https://play.google.com/store/apps/details?id=com.mayukh.tiktaktoe


            Hey Guys!! this is my new arena, and I am a bit perplexed about it. I have been working in android for a long time, but Game!!, this is surely a new thing to get your hands dirty. Let me tell you that Game Industry is one of the fastest growing industry in the world. For example take android for instance, out of every 25 apps in Android Play Store, 23 are game itself. This is probably because game is something which is very well played by a wide range of audience, and it is very much in compliance with small handset device you use. Quintessentially,  I travel mostly to and fro, between my college and my home in Guwahati. For those who knows about these places, bus journey between Silchar and Guwahati is like 10 to 12 hour long. So I have found myself as well as my co-passengers to engage in either music or gaming in small handsets. Games and music are the most common time pass of the world and that is one reason why these two industries are the most booming in current world. In this context, two major game development companies are worth mentioning. Imangi Studios, best known for the world famous Temple Run Series, and Rovio Entertainment best known for the Angry bird franchise. The husband-wife pair of the United States and worth applauding creator of Temple Run (Natalia Luckyanova and Keith Shepherd) and Finnish college trio of Rovio Entertainment (Niklas Hed, Jarno Väkeväinen, and Kim Dikert) are inspirations to millions of small time game developers.
                 Coming to my own game, this game is developed on android sdk. Not much of graphics has been used here. As a beginner, I tried my hands on canvas of android. Te tricks of the canvas can be used for many allusions you can create with simple codes. The codes for the game Tik Tak Toe can be downloaded from here: https://drive.google.com/file/d/0B-7SqmMCsRSObzAyUHozVFI3Yms/view?usp=sharing. 
                      Thanks Guys. You keep me motivated when you read my blog and send me valuable suggestions. This motivation will be immensely amplified if you guys rate and give review to my apps in play store. Thanks. 
                      
                      


           

Friday, 12 June 2015


 Arduino based Android Smartphone controlled DC Appliances


 Hey folks, I haven't been writing for a long time. I guess, a learner like me takes his time to learn things and then apply in its proper place. The last four to five months were wonderful, because I got to learn working on Android. Since I am a hardware man, I tried in my own way an integration of android and hardware, and guess what, the first thing that would probably hit is a “Home Automation” application.
Now, what is a Home Automation ? Well, other sobriquet of home automation is “Smart Home”. Today, almost more than half the population of earth uses smart phones, and the number is increasing day by day. These small hand held device is used not only to contact people but surf the net, do office work and entertainment. So day by day, our dependency on these devices are increasing and I say it is for a greater good, because these devices are portable and we keep it with us most of the time. What, if we could control our home appliances like lights and fans with these devices too. I found that we could actually by integrating these devices with hardware. We can always always design an embedded systems with the help of microcontroller and get it communicate with deevices like a bluetooth modem. Our smart phones have inbuilt bluetooth sockets and we can make use of some of the apps which can send data over the bluetooth and thus with the help of the given data we can control the lights fans we have designed in our embedded systems.
The application I have designed is shared here and also right now been published in the play store. My worthy collegue Chaman Jain and my teacher Sudipta Chatterjee has
helped me a lot and time to time has given me required motivation to designed this whole project. First I will let you know how to make the the circuit of the control systems I have designed.


Things you gonna need:
a. Arduino Mega (Development Board)
b. Bluetooth Modem (HC-05)
  1. An RGB LED.
    d. A DC fan
    e. A Breadboard along with some hook up wires
    f. an Android powered smart phone (Android 4.0 or above)


    So below is the circuit diagram. I have used a common cathod RGB LED, if you want you can use a common anode LED too. No issue as such on the choice of the LED.

      




The GND pins of the RGB LED, DC fan and the bluetooth modem is connected to the ground. The positive pin of the DC fan is connected to the pin 8 of the arduino. Red pin of the RGB is connected to pin 9, green to pin 10 and blue to pin 11. The RX pin of the bluetooth modem is connected to pin 15 (TX1 of Arduino Mega) and similarly TX pin is connected to pin 16 (RX1 of Arduino Mega). 


This app is now published in Play store, get it from the following URL: