Arduino Forum

Using Arduino => Networking, Protocols, and Devices => Topic started by: totti_dbw on Dec 10, 2018, 02:57 am

Title: HELP!! How to using this scheme Arduino---router---internet---router---Arduino
Post by: totti_dbw on Dec 10, 2018, 02:57 am
Hello, I have 2 Arduino mega and 2 w5100 ethernet shield, i want both arduino can communication via internet using ethernet shield and wifi router, each example if I push the button at first arduino, the second arduino led will ON, but i have stuck with UDp ethernet send receive didn't work ,anyone have an example?
from ethernet shield to router i use straight LAN cable Cat 6. Thank You
Title: Re: HELP!! How to using this scheme Arduino---router---internet---router---Arduino
Post by: PaulS on Dec 10, 2018, 01:14 pm
With the ethernet shield, the Arduino can act as a client, making requests to servers, or it can act as a server, handling requests from clients.

Which role should each of your Arduinos perform? When you have that sorted out, making the client make a GET request, to have a server turn on an LED, is trivial, as is handling the request on the server.
Title: Re: HELP!! How to using this scheme Arduino---router---internet---router---Arduino
Post by: totti_dbw on Dec 12, 2018, 10:12 am
With the ethernet shield, the Arduino can act as a client, making requests to servers, or it can act as a server, handling requests from clients.

Which role should each of your Arduinos perform? When you have that sorted out, making the client make a GET request, to have a server turn on an LED, is trivial, as is handling the request on the server.
Oke, I have change my role to my arduino to be (arduino+ethernet shield w5100) --- LAN Cable --- (arduino+ethernet shield w5100) for simple arduino to arduino communication ( example if I push the button at first arduino, the second arduino led will ON)

I use UDP Send Receive example, but the task can't perform like i want.

I attach UDPSendReceiveString.ino i confused to change the program, because i'm newbie with arduino programming

Can You help me? Thank You
Title: Re: HELP!! How to using this scheme Arduino---router---internet---router---Arduino
Post by: PaulS on Dec 12, 2018, 02:30 pm
Quote
I use UDP Send Receive example, but the task can't perform like i want.
The code does something. You failed to describe what it actually does.

You expect the code to do something. All that hand-waving your are doing is pretty, but useless. FACTS are useful.