PC communication with Arduino

I have a Arduino 2560 Mega with a wifi shield. I basically have to get the Arduino to control several actuators depending on which key i press on the computer.
I can program the Arduino to receive data over a local network but i dont know how i can get my PC to send data to the Arduino. I did it using LABView a while back but I need something simpler right now. The software I need should be able to tell the Arduino which key is pressed on the computer and also display a live feed of an IP Camera mounted near the Arduino.

uneebishfaq:
The software I need should be able to tell the Arduino which key is pressed on the computer and also display a live feed of an IP Camera mounted near the Arduino.

Just send the keys via the serial link to the Arduino

However, I doubt that you will find any off the shelf software that will display the feed from an IP camera and also send keypresses to a serial com port.

You'll probably have to modify some existing open source IP camera viewing software and then recompile it etc

The project is a toy car that has to react in real time. That is, if I press 'W' on the key board the car will move forward for the time 'W' is pressed and stop when the key is let go. This has to be done wirelessly over a wifi shield as it is a requirement. So doing it serially will require XBee or some other module which is not allowed.
The IP camera feed can be accessed by a simple browser window. When I used LABView I just imported the browser window onto a GUI

I can figure out the IP Camera part but right now I need to know how I can send a key press to the Arduino

Are you saying that all of the communication between your PC and the Mega is via Wifi?

Can you write a browser page and run a small server on your PC to send data to the Mega?

...R

Yes all the communication has to be done via wifi

No I have only studied a little C so I dont know any web programming

uneebishfaq:
No I have only studied a little C so I dont know any web programming

Time to get out the text books, I think.

Have look at Python Bottle - it is very easy to use.

...R

Thank you for your help :slight_smile:
I'll see what I can do

I have been looking for projects like mine on the web. Wouldnt it be easier to make a simple web server API and send the commands to the Arduino just by changing the URL in the browser window ? Instead of pressing keys, I could just type in the URL. Would this work?

uneebishfaq:
Wouldnt it be easier to make a simple web server API and send the commands to the Arduino just by changing the URL in the browser window ?

It could be made to made to work but it probably would be no easier and a lot less convenient.

The Arduino has to make web requests to the server and get appropriate responses so you need server code for that regardless of how you inform the server what response it should make .

Have you played around with Python and Bottle?

I suspect you need to spend a few days learning the basics of web programming.

...R

Ill need a little more than a few days because I get less than 2 hours a day for this. I am at work now so I cant look at the Python thing until I get home