I have a arduino with the ethernet shield, Its been working ok ... expect for the power/reset problem but I'm going to run to the store tomorrow to see if i can fix that. On to my problem, I've been making a basic web server and everything goes fine if I stay in the main loop function (which is where I set the client to the server.available) but when I move to a separate function that needs to talk to the client ... I get an out of scope error, which I expect but what I don't know how to do is declare the uninitialized client so it will be global to all my functions / subroutines. I tried re-declaring the client in those functions but its not the most reliable thing in the world and most times I end up having to reset the arduino because it keeps waiting for the client to be available. If anyone knows if this is possible ...
I also tried passing the client object to the next subroutine and I available is always nothing until it moves back to the calling function where the data is waiting and gets processed by the first routine ( I don't know if the arduino supports passing objects by reference, anyone know how to do that?)
any ideas would be helpful