Using iPhone as control device (game controller type) in Windows - iphone

Is there a way to use the iPhone as an interface device for a computer without actually having to code a driver? Being the owner of a sub-par game controller and realizing that it would be cheap and a good experience to try to roll my own, I have no idea where to begin on the PC side. I am capable of processing accelerometer and touch events on the iPhone and sending them over a network, but where would I begin on the Windows side? I'd prefer to not get as low level as a driver, but I want to be able to use the accelerometer as an analog input device and buttons on the screen as regular buttons. How should I go about this? If I have to write a driver, what would be a good reference/code sample to start with?

You don't need to write drivers as long as you handle the data being sent by the iPhone on PC. As far as where to begin on PC side, all you need to do is create a small program which listens for data on the socket. You can make that program in any language C, C++, Java etc. I had worked on a similar application as mentioned by you. On PC I used Java with Visual Studio IDE.

I believe this is similar to what Splashtop's Remote does (http://www.splashtop.com/remote/touchpad). They seem to use a network connection to accomplish this goal.
Also Joypad, same concept (http://getjoypad.com/).

Related

To make bluetooth connection pc between device through web app, pc side program, what is it made from?

I almost understand how to send message device to device.
But, I don't know how to do this with pc.
I tried to find it, but the most curious thing is,
'How can I make server side program on pc?'
I know how to provide web service by server, but for that, I have to make environment like APM on PC.
But, that's not what I want. Because it means, someone who want to use that program should make environment like that I have.
Actually, I tried to make remote controller application like X-remote...
That kind of applications, just download program and install it on pc, then pc act as a server.
what is it made from? C#? php? Java swing?? I have no idea about that...
Device is Tizen, so we will make a web app.
How can I make pc program like other remote application?
It seems that right now you cannot emulate Bluetooth on Emulator. As far as I remember when developing some sample applications, we have been using some fixed data. You could also write whole application using simple PHP server, and change the communication from HTTP to Bluetooth at the end of development.
Please analyze BluetootchChat sample application in the SDK, it should give you an overview about the BT communication in JavaScript.
Remember about the privileges in config.xml file.

External device input

I am looking into what's the best method for getting external data (custom built hardware) and to intercept and process this data (programming language / tool), the cheapest and easiest and with the least learning curve.
Background:
I am a web dev.
External device will be switches, motion detection, velocity detection
Programming language: Delphy (which I don't know)? or C# (which I know for web dev) or other?
Anyone done anything like this before? Got any advice?
Any and all information is appreciated.
D
The easiest solution might be to use an Arduino.
It's :
cheap (~ 30$)
easy to program
easy to connect to your PC (it use an USB cable which emulate a serial connection)
have a HUGE community with tons of tutorials for doing whatever you want
Here is an example how to control a led using C#

Controling Pc Mouse from Gryoscope/Accelormeter

I have build an IMU consisting of an Accelerometer and Gyroscope that can provide 6DOF motion output results to pc. I use a serial COM port over USB interface to get data on pc and i can see the data through Hyper terminal.
Now what i want to do is control my mouse pointer with that data for demonstration purposes. I initially looked at GlovePIe application but it doesn't support serial com ports. So it would be great if anybody could advice or direct me to a possible solution.
I am doing something similar, controlling pc mouse with android phone. But I am using Bluetooth and the touchscreen as input. You can look into win32 api functions for controlling com port.
You can also you sockets to send coords over tcp/ip. Setting up Bluetooth/Sockets is fairly easy once you understand the api calls. Let me know if you need more assistance.
use C++ code to controll the pointer location. SetCursorpos(x,y).Enjoy

How to create a Mac/PC server app that interacts with iPhone/iPad App?

Can someone please point me in the right direction to create a Mac/PC server app that runs in the background and connects to an iPad app over the local WiFi network?
No matter how I phrase a search on Google it just brings up various apps like Remote Mouse and whatnot and no tutorials or even a hint of where to start.
I just need to send simple commands from iPad to computer over local wifi. A point in the right direction and I can likely fill in the blanks.
Thank you.
Thomas
EDIT: I am using web languages for the iPad version that I will build as a native app using open source tools.
OK, then. It actually depends on what you really need. I made the assumption you need real-time and perhaps binary data transfer.
Your best bet is to write your server application using standard C or C++ so it compiles on both as simply as possible.
If you want to avoid all the burden of writing a protocol for service discovery or asking users to enter the ip address of your server you will use a mDNS implementation for your server and your iPhone app.
If I were you I would try bonjour: http://www.apple.com/support/bonjour/
on iPhone You could start here: http://developer.apple.com/library/mac/#documentation/Networking/Conceptual/NSNetServiceProgGuide/Articles/PublishingServices.html
Once you have your sockets you will have to implement a networking protocol between your server application and your iPhone app.
You will have to be careful about byte ordering and little subtle problems with latency, disconnections and other problems inherent to networking and WiFi.
In windows you will want to register your application as a service and in Mac OS X/UNIX you'll probably want to deamonize it.
Good luck!

How to control any IR based home appliance using iPhone? Will it require SSH/UPnP based application?

I want to use ssh protocol. I want to make an app to transmit signal that would ultimately converted to control IR based home appliances (like controlled by IR remote control. i.e. TV)
This stuff is new to me. I don't have any clear understanding about how it will be possible.
I got suggestion to use SSH:
->Install SSH on your server.
->Configure your Network / Router to forward the SSH port to server and
->Use the SSH client on the iPhone.
Now. Is it the only way?
Someone also suggested to develop UPnP base app!
Is there any sample code available using which I can learn How to transmit the signal from iPhone to do above.
Please give some guidence if anybody has done such thing before or if they know how to do?
So that I can understand the flow and put my efforts afterwards.
If I understand correctly, you want to go iPhone->IR transmitter->(some device that is controlled by IR)
If so, you probably want to use whatever protocol the IR transmitter device is expecting.
If it's not expecting anything, I would look to HTTP, rather than SSH. Implementing SSH on the iPhone sounds like a huge hassle, and the only benefit of it is the tight security. Unless the device you are controlling is a nuclear weapon, I would go with some simple HTTP authentication.
For example, if it was a TV you were controlling, you could just request http:///remote.php?action=turnonthetv from your server. Then you'd use a PHP script to generate the IR signal to turn on the TV. This moves a lot of the logic off of the iPhone, which may or may not work with what you're doing.