Hello, I have 5 arduino all with ethernet and a webpage. Is there a way I can connect another arduino connected to the same network and detect ip address for each arduino?
Joseph
Hello, I have 5 arduino all with ethernet and a webpage. Is there a way I can connect another arduino connected to the same network and detect ip address for each arduino?
Joseph
YES! Yes! Yes!
@ua6em How would I be able to do that? I don't use home automation of any kind and I do not store any informations.
If the network uses the DHCP service, assign an IP address to each device
@ua6em The only problem is where these goes I only put dhcp and can not assign a static Ip address.
What I mean is I send out arduino with tempererature sensors to my friends and they don't program so I'm trying to give them a screen with an arduino on it and when he plugs it into his network it can detect all the arduinos on the same network and show there temperature on the screen.
I'm trying to figure that out if that is possible.
The last IP address in the subnet is for broadcast, meaning a packet sent to that address can be seen by any device on the subnet. I suggest you experiment with sending broadcast messages so other devices can read it and establish communication. Be careful not to spam the network with a flood of messages, and you need to consider the possibility of 2 devices sending at the same time.
As @perricwiky suggested,
Read and explore about UDP broadcast messages… that’s how your PC can search for printers etc on the SAME network.
Thwe problem Is that who ever I give this to won't know what to do with networks or how to detect an Ip address. I'm trying to setup a second arduino with a screen displaying information from other arduinos without having to add ip address. So that it can display the other arduino information.
Nothing I or @lastchancename has suggested requires the people you send them to to enter IP addresses or anything else. What we have suggested should happen automatically. If you don't understand the suggestion then please explain what you don't understand so one of us can clarify.
analog #include <ESPmDNS.h> ?