I'm new to networking and currently trying to figure out the best way to approch my project, so some help would be glady appreciated :-)
I want to connect the arduino to a PC, where there's a software running which allows the sketch on the arduino to be manipulated. They are connected with an Ethernet cable. This is already working, but only with fixed IP adresses in the sketch - however, I want the arduino to be able to work with different PCs.
My current idea is to let the arduino broadcast its IP to the local Network using the Broadcast IP until the PC responds. After this happened, the PC should send ist own IP for ocmmuncation so the broadcast stops.
I am thinking about broadcasting using UDP ( found this link and this link that might be helpful for me), but I am not sure if this is the right approach and also don't know how to receive the IP of the PC once Connection has been established.
Following Hardware is used: - Arduino Leonardo - Ethernet Shield 2
I am thankful for any advice! :-)