Go Down

Topic: control without port forwarding (Read 4 times) previous topic - next topic

wildbill

Rather than a web server and client, use the server and client provided by the ethernet library. It looks as though (have not tried it) it will set up a persistant connection that both ends can write on, so once the arduino has initiated the connection, the Linux box should be able to send to it as long as the connection is kept open.

arjena

#6
Mar 22, 2013, 01:00 pm Last Edit: Mar 22, 2013, 01:03 pm by arjena Reason: 1
@ billroy: Sounds like this is what I need. I'll look into it as soon as time permits (somehow my job tends to get in the way) and report back here.
@ wildbill: I'll look into that too. Weekend is nearly here so I might have some time to spend on this.


Thanks,

A

wildbill

One other thought, do you really need this level of real time response? I assume that this setup is to allow you to turn things on and off remotely. If so, do you really care if it takes a little while to take effect? If not, just have the arduino web client poll the linux box periodically with a get request telling the web server what the current sensor readings are. The web server response will tell the arduino what state it wants the output pins to be in. All user facing display of data is handled on the Linux web site.

arjena

I'm afraid time is of the essence here :). Not for all functions (i.e. switching between home- or away-temperatures on a thermostat), but one of the things the Arduino controls is a (3-color-led-) light dimmer. You control a slider in the interface and the dimmer is set accordingly. A slight delay is acceptable, but when it takes a second for the light to react it will take several tries before you reach the right mood/color. And having the Arduino poll the server every 100ms seems like overkill to me...

wildbill

Agreed, if you need interactive response, polling is a non starter. Sounds like ethernet library all the way - I'll be interested to hear how it goes.

Go Up