How to send values over wifi?

Hi and greetings from Germany,

Im new to Arduino and trying to get one of my first projects to work.
The scenario is like this:

1xArduino Uno with temperature sensor and redfly wifi module
1xArduino Uno with a servo and redfly wifi module

I can connect the Unos without an access point (ad-hoc) but I dont know how to send the temperature value to the other Uno via Wifi. I read about webserver but i still dont know how to manage it.

I hope you could tell me an easy way to send a value via Wifi from one Uno to another.

Thank you.

Daewwid

but I dont know how to send the temperature value to the other Uno via Wifi.

You can't. A client can ask a server for information. Part of that request can be information needed to satisfy the request. The client can say something like:
GET /?temperature=37 HTTP1.1

The server than looks at the request, to determine what to do, and what data is present that is needed to do whatever needs to be done. The data is in the form of name = value pairs, following the ?, with & separating multiple name=value pairs.

It is up to the server to do something, possibly even something useful, with the data.

So i cant send a value on the fly?

Okay then the Uno with the Sensor has to be the Client, right? And with the request he "sends" the value to the Server and the Server can now adjust the Servo, for example?

Thank you.

Daewwid

The wifi is the transport. You need to determine what protocol you want to use. Maybe UDP would be best for you.

Okay, so i have to use an UDP-Socket? There are a few RedFly examples but they are very hard to understand for me. Could you try to explain the way to send a value over an UDP-Socket?

Thank you.

Daewwid

Okay then the Uno with the Sensor has to be the Client, right? And with the request he "sends" the value to the Server and the Server can now adjust the Servo, for example?

That is the simplest process to get working.

The UDP example included with this library seems simple enough.

Sorry, but I dont think the example is easy to understand. I read and tried the UDP and EchoTest examples and both are quite confusing.

I copied the UDP example on two UNOs and want one to be the client and one to be the server but i just dont get any data. Could someone please explain me how to do this?

Thank you.

Daewwid