Ethernet Help

Hi,

I'm trying to build a device to switch between different audio outputs, and control volume. I have found/ modified all the code that I need for rotary encoders/ push buttons and have it running on one Arduino Uno.

Now, what I want to do is send a set of values from one Arduino with all the encoders/ switches connected, to another Arduino with a Digital Potentiometer and Relays connected over Ethernet. This I am struggling with.

I can get the two Arduino's to connect to each other, but I am struggling to work out how I can send a value stored as a variable from one board to the other. Can anyone help me with this or point me in the right direction?

Thanks

I assume that if you have got the 2 Arduinos talking then you have one setup as a client and one as a server.

To send data from the client to the server, you need to have the client send an HTTP request to the Arduino acting as a server. The simplest way to do this is to construct a string for the url that looks like this:

http://192.168.1.x/data?pot=123&switch1=on&switch2=off

Then send a request with that URL to your server Arduino.

When the server gets it, you just strip off the request parameters pot=123 etc and do what you will with them.

You should be able to find example sketches of all this kind of thing in the examples that come with the Ethernet library.

Good luck! Sounds like a fun project.