Hello, for my wifi robot project, I'm using an arduino ethernet. however, I'm pretty new to the arduino language.I've been playing around with it, and I'm able to make the dc motors go forward and backward using an H bridge IC.Now, I want to control it over a local network... How would I go about that? What I want to do is kinda like this:

//AND HERE THERE WOULD A SELECT CASE DOING DIFFERENT THINGS DEPENDING ON WHAT BYTE THE ARDUINO RECIEVED. //for example either turning pin 2 or 3 high. //digitalWrite(2, HIGH); //digitalWrite(3, HIGH); //which would make my motor go either backwards or forwards. }}That looks like a pretty good start to me. I don't understand the question I guess. Have you tried doing that and you're not getting the results you want?

Joe

Well... in the comments I note where a part of the code should go, but I'm unsure on how it would look like in the arduino code.The commented part at the end describes what should go there, instead. The code wouldn't do anything, because there's no controlling going on.

I want to be able to send bytes to the arduino from another computer on the local network, and it should make different output pins high depending on what byte.

Edit: since no one is replying, I want a piece of code, that would be essentially like a select case in visual basic. To clarify my point, it would be this in VB:

I figured out there's a switch ... case instead of a select case. Silly me, all the vb.net has got me brainwashed.

So would something like this work? I'm not used to using brackets anymore, so are they correct?Also, is there a chart or tutorial on which I can see which ascii character would give me which byte.. or is it just their ascii number?

switch (incomingChar) { case 1: //forward digitalWrite(3, LOW); digitalWrite(2, HIGH); break; case 2: //backward digitalWrite(3, HIGH); digitalWrite(2, LOW); break; default: //make sure it's not moving digitalWrite(3, LOW); digitalWrite(2, LOW); break; } }}Okay, so I found this chart: http://arduino.cc/en/Reference/ASCIIchartWhat's the easiest way to connect to this, and send those values? Would I be able to telnet into it and type the letters?

Are you asking what functions to call for serial communications? If so The arduino site has a reference page that explains all their functions. They also have a section on libraries other than the built in ones. This should give you what you need, look for the serial section:

Are you asking what functions to call for serial communications? If so The arduino site has a reference page that explains all their functions. They also have a section on libraries other than the built in ones. This should give you what you need, look for the serial section:

I'm terribly sorry, but I don't think you're properly reading my posts. I think have a serious miscommunication either way. I'm asking about how to send the bytes over the local network to my arduino. I have proposed a piece of code (which I figured out after reading through the arduino references as I mentioned before you linked it to me.)and I'm asking about the computer's side. I think serial communication has little to do with this?