<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Control NodeMCU</title>
</head>
<body>
    <h1>Control NodeMCU LED</h1>
    <button onclick="sendBlinkCommand()">Klik untuk Blink LED</button>

    <script>
        function sendBlinkCommand() {
            // Kirim perintah ke server untuk mengaktifkan Blink LED
            fetch("https://wash.wdpdev.co/data/sendBlinkCommand.php?serialNumber=271272")
                .then(response => response.json())
                .then(data => {
                    if (data.status === "success") {
                        alert("Perintah blink LED telah dikirim!");
                    } else {
                        alert("Terjadi kesalahan!");
                    }
                })
                .catch(error => console.error('Error:', error));
        }
    </script>
</body>
</html>
