making wemos d1 network / 2 way communication morse

hello guys, I hope i've chosen the right place to put this.
I want to make a network between 3 wemos d1s. two of them are clients and there's one host.
and each of them clients has one button and one LED. and the host has 2 buttons and 2 leds. client buttons will controll its led on the host. and the buttons on host will control each led on the clients. think of it as a 2 way morse communication, which works wirelessly and through LEDs. im having trouble with wiring and codings. any idea?

what have you tried so far?

I tried some HTML-based builtin_led examples from the web but I don't want HTML control my clients i want 2 actual wemos listen to its host and the host listen to the clients and do stuff by using actual buttons.
do u have any idea or examples from the web that can actually be helpful?

Here would be my plan to break it down into simple steps.

  1. Write a sketch that reads a character from the serial port and controls a LED on the board. There are examples in the Arduino that get you started on this.

  2. Add a push-button to the board. Modify the sketch to send a character when the button is pressed. Your sketch should still receive characters and control the LED. You may need to debounce the switch. See the "doing several things at once" post in these forums for important points. This step may seem small but mastering it is a big step in your programming ability.

  3. Program another unit with the same sketch and wire the serial ports together (TxD on one goes to RxD on the other and vice versa). Ensure that pressing the button on one unit can control the LED on the other. Modify your sketch until it works properly in wired mode.

  4. Modify your sketch to use UDP packets instead of wires between the serial ports. See for example code.

  5. Once your sketch works wirelessly expand it to more than one switch/led for the master.