Guided Project 2

Due date

This homework is due on February 12, 2010. and must be submitted as a pde file to the UNCA moodle activity HW 2.

The Protocol

At this point, you should have working Pong programs: One in Arduino program and the other in Processing.

The next projects are to create a general-purpose client-server will can use for applications like this. We're going to start by working on the client part. Write now your Arduino speaks directly to your Processing program. We're going to change that so that the Arduino sends its output to a host program, running on the system to which the Arduino is connected, and that program becomes a client program that will eventually connect to a game server. In order to do this there must be a well-defined protocol, but that's no what this document is about.

As an experiment the design document is being kept on a Moodle-managed Wiki. I'm actually not at all sure how this thing can be safely edited, but that's something we'll find out.

The task

Your job is to implement the server side of the protocol for a Pong game. Your server will accept connections from two different clients that represent different paddle controllers. This means modifying your existing Pong program to read from sockets, rather than from serial input from the Arduino.

Start off by getting it to read a single socket, then go on to getitng a second to work. You can test your program using nc.

Useful references