Two ESP32s over ESP-NOW
ESP32 1 sends its button over ESP-NOW to every board (FF:FF:FF:FF:FF:FF); ESP32 2 lights its LED while it is held. Each board prints its own MAC: to send to one board, put its MAC in the sender (or set the receiver’s MAC in its settings).

The code
// ESP32 1: sends its button (GPIO 15) over ESP-NOW when it changes, and every half second
// (a board that started later, or missed one, catches up), to every board
// (FF:FF:FF:FF:FF:FF). To send to one board, put its MAC here instead: board 2 prints it.
#include <esp_now.h>
#include <WiFi.h>
uint8_t to[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
void sent(const uint8_t *mac, esp_now_send_status_t status) {
Serial.println(status == ESP_NOW_SEND_SUCCESS ? "Sent" : "Not delivered");
}
void setup() {
Serial.begin(115200);
pinMode(15, INPUT_PULLUP);
WiFi.mode(WIFI_STA);
Serial.print("My MAC: ");
Serial.println(WiFi.macAddress());
if (esp_now_init() != ESP_OK) {
Serial.println("ESP-NOW did not start");
return;
}
esp_now_register_send_cb(sent);
esp_now_peer_info_t peer = {};
memcpy(peer.peer_addr, to, 6);
peer.channel = 0;
peer.encrypt = false;
esp_now_add_peer(&peer);
}
void loop() {
static int was = -1;
static unsigned long last = 0;
uint8_t pressed = digitalRead(15) == LOW;
if (pressed != was || millis() - last >= 500) {
esp_now_send(to, &pressed, 1);
was = pressed;
last = millis();
}
delay(20);
}
More like this

Two ESP32s over Bluetooth LE
ESP32 1 is a BLE server with a knob, notified to whoever subscribes; ESP32 2 scans for its service, connects, subscribes, and dims its LED to the knob. The bench’s phone can connect to ESP32 1 too.
ArduinoESP32 DevKit V1

Nano blink
The same Blink on an Arduino Nano, its LED on D13.
ArduinoArduino Nano

Two Unos over serial
Two boards, each with its own program: the first sends "ping" every half second, the second toggles its LED and answers "pong". Pick a board above the code to see its program; its serial monitor has a tab.
ArduinoArduino Uno