01110100110101010101011101100010
Posts tagged application
Game On / Weekend Project III
Sep 25th
Few weeks ago I posted about playing pong using tilt sensors on the phone, Now me and Abhimanyu have taken that to the next level and have made it a generic game controller for any game running on the computer. We faced some problems when Abhimanyu’s Samsung Wave refused to work, but luckily i bought a Samsung Galaxy 3 (Android 2.1) about a week before that, so we shifted out focus on Android.
For Game On we make use of the phone’s sensors and touch screen to generate different gestures and motion events, we use these events to generate control data and sent the control data over a socket to the computer over a wireless network. On the PC the received data (different for each motion event or gesture) is processed by the computer and a specific task is performed, in this case generating a Key Event.
The Code for Game On can be found on github
Here is a video of the android phone (Samsung I5800 Galaxy 3) being used to control a car racing game.
And now the working
After this we decided to work on something which i wanted to finish a long time ago (remember Weekend Project I) so we finished Weekend Project III which is well Weekend Project I + Weekend Project II
And the working of Weekend Project III
The Data Flow is Phone —-WiFi—-> PC —-USB—-> USB to RS232 Converter —-UART—-> MicroControler —-Relays—-> Toy Car Remote —-RF—-> Toy Car, which is almost same as that of Weekend Project I, except for processing of Sensor Data on Phone.
PS – if you were not able to look at the video’s above they can be found here, here, here and here, also Game On won 2nd prize in Mobi Vision – a mobile application development competition
Creating a Simple Chat Application with Python
May 1st
Creating application with Python is very simple, here is a simple chat application made by using the socket module, it has 2 parts First Server and Second client, you run the server first and then connect the client to it, here is the code
Here is the Server Code
#!/usr/bin/env python
from socket import *
from time import time, ctime
IP = ''
PORT = 23456
ADS = (IP, PORT)
tcpsoc = socket(AF_INET, SOCK_STREAM)
tcpsoc.bind(ADS)
tcpsoc.listen(5)
while 1:
print "Waiting for connection"
tcpcli, addr = tcpsoc.accept()
print "connected from:", addr
while 1:
data = tcpcli.recv(1024)
if not data : break
print data
data1 = raw_input(">>")
if data1 == "q;t": break
tcpcli.send(data1)
tcpcli.close()
tcpsoc.close()
Here is the client code
#!/usr/bin/env python
from socket import *
IP = ''
PORT = 23456
ADS = (IP, PORT)
tcpsoc = socket(AF_INET, SOCK_STREAM)
tcpsoc.connect(ADS)
while 1:
data = raw_input("msg>>")
if not data : break
tcpsoc.send(data)
data = tcpsoc.recv(1024)
if not data: break
print data
tcpsoc.close()
the code above might not be properly intended so you can download the code from http://fb.ankurs.com/tcp_server.py and http://fb.ankurs.com/tcp_client.py
enjoy!!!
First Manipal Facebook application
Apr 15th

I have made a facebook application on the lines of all those What ______ are you??? and its What MIT Character are You??? its written in PHP and is well the First Manipal Facebook application as fas as i know….. and well i am seriously waiting for more questions for the app so plz tell me if you have any
PS – Questions on the application were given by Ravi and Ankit, and the final character by Dinkar and Me……





