Playing Games in PC is always fun. Play with joy stick with out key board is some more fun. No joy stick still no problem u play with your Android smart phone.
First i think it is a very simple program. But want to jump lot of huddles to reach the goal with my resources.
Step 1: Materials Required
1) Linkit one board with Blue tooth antenna.
2) Android Mobile.
3) PC with Games installed.
4) Arduino Bluetooth RC Car app Down load from here.
Step 2: Linkit One Program
1) A simple Link it one program to capture the Data received from blue tooth to serial port of the PC.
2) Copy the program and upload it to linkit one.
1st Huddle here
USB Keyboard library not work in Arduino uno and Linkit one. At first i plan with Bluetooth and USB keyboard library. After 1 to 2 days full testing i cant able to achieve it. If u have arduino leonardo then no problem just send the key stocks from arduino it self. To over come this problem in Linkit one. I do a small program in Visual Basic.
Step 3: VB Program
1) From Sent from Linkit one through USB serial port is received by VB program.
2) Use MSCOMM control to receive the Data.
3) Using Timer do the work continuously. (If u use VB.net then dont want to use Timer. serialPort on data received is used to do the action).
4) Find the data sent by the android program.
5) Its is listed above for all direction.
6) Like wise find the game keys in the keyboard.
7) By using the condition statement on data receive. Raise a send keys command to invoke keyboard virtual press.
2nd Huddle here
Now i think it finish and ready to work, but the key strokes send by sendkeys are very slow. When check with note pad. So it also take my 2 days time. Do lot of test and found in Windows XP send keys fine. Even after change lot of UAC in Windows 7 its still very slow. After some short cut it also corrected. See the next step.
Step 4: Over Come Sendkeys Problem
On install PhraseExpress in Windows 7 make the sendkeys fast as like Windows Xp. Try to find the cause but not. So simply download PhaseExpress from here and install. Now it all done and jump through all the huddles and reach my goal.
Step 5: Running VB Program
1) Just double click the exe.
2) If MSComm32.ocx not in ur PC then it cause error, in that case download MSComm32.ocx from net and paste it in ur windows system32 folder.
3) In the device manager find the link it one Moderm port.
4) Type the Comport number in the text box.
5) Click play game. The form automatically minimize to task bar.
Step 6: Lets Play
1) Open the game in the PC.
2) Open the VB program.
3) Now open the Arduino Bluetooth RC Car app in the mobile phone.
4) In the top left corner a red light blinks. it shows micro controller connected or not.
5) In the menu click connect, it listed the available bluetooth devices.
6) Click the Linkit one.
7) After connect the left side button changes to green.
8) Now Its ready Click start game in the VB program. It minimize and the game start.
9) Use button to play.
10) If bored go to menu and change the type to Accelerometer.
11) Now move car by just tilt ur mobile.
Step 7: Video How to Play
Very fun to play. Change the VB program as per the game u play and play all the games with the free apps supplied for other applications. See the above video.