ish a WebSocket connection to the server
        ws = new WebSocket('ws://localhost:5000');
  
        // Change the LED status to 'on'
        sled.classList.remove("led-off");
        sled.classList.add("led-on");
  
        // Display a success message
        const statusMsg = document.getElementById("status-msg");
        statusMsg.textContent = "Connected to server successfully.";
  
        // Listen for incoming messages from the server
        ws.onmessage = handleServerMessage;
  
        // Liste