[SOLVED] Communication between 2 Arduino Yun over WiFi

This is my first time using Arduino Forum. I just bought 2 Arduino Yun for my project.

How can we send a command from a Yun board to the second Yun board over wifi? Ex, We connect a push button to the first Yun board, and an LED to the second Yun board. How to send the push button status (0 or 1) over wifi to the second Yun board to turn on / off the LED?

check the TemperatureWebPanel example, you can try to ask for the command from one arduino to other. also check the REST protocol.

IHMO I think that the only problem is to understand the yun ip. after that you can do it in the way you are more comfortable: raw socket, http, udp, osc, what you want. in which language do you want: c++ on arduino side, python, js with nodejs.. whatever

ATM, the easiest thing to do is to write on each yun’s /etc/hosts file the IP address of the other one
This way, your sketches/programs will use the name instead of the IP and, if and when you’ll have to change it, you’ll change it in only one place

More articulated solutions implies using a local DNS server

Set one Yun as Access Point

http://forum.arduino.cc/index.php?topic=256234.msg1813025#msg1813025

leave an other one as Client

Plan B:

Set both Yun as Ad-hoc

Plan C:

Use mesh network:

http://forum.arduino.cc/index.php?topic=217078.msg1815907#msg1815907

Plan A: 1:N Plan B: 1:1 Plan C: N:N

Thank's for all your answers. I finally got the answer of the problem.

http://forum.arduino.cc/index.php?PHPSESSID=sh8oc448lt4tffivf0ooiqp5u7&topic=236467.0