Control LEDND with HTTP

HTTP access from browser

If the connection mode of this product is set to "Wireless LAN", you can control LEDND by sending commands via HTTP/HTTPS communication. When accessing via HTTPS, use the configuration utility to upload the host certificate and private key file to this product.
In this example, the IP address of this product is set to "192.168.1.251" and the domain name is set to "example.local".
Access by entering the following URL in your browser. For details on commands, please check the command list in the LEDND instruction manual.
■Display "1,234,567"
 http://192.168.1.251/disp/1,234,567
 https://example.local/disp/1,234,567
■ Clear display [Command:0x0C]
 http://192.168.1.251/disp/%0C
 https://example.local/disp/%0C
■ Brightness adjustment [Command: 0x1F 0x58 n (n:1~4)]
 http://192.168.1.251/disp/%1f%58%01
 https://example.local/disp/%1f%58%01

HTTP access from a program

You can send HTTP requests and control LEDND from a program.
Below is a sample program that displays/clears numbers on LEDND. Before running the program, please make sure that the connection mode set using the LEDND configuration utility is "Wireless LAN".

<!DOCTYPE html>
<html lang="ja">
<head>
    <meta charset="utf-8">
    <title>javascript sample program</title>
    <script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
</head>
<body>

    <input type="button" id="disp" value="table">
    <input type="button" id="clear" value="clear">

    <script>
        $('#disp').click(function() {
            console.log('Display button clicked!');
            $.ajax({
                type: "GET",
                url: "http://192.168.1.251/disp/1,234,567",
                dataType: "json",
                timeout: 5000
            })
            .done(function(data){
                console.log('disp success');
                var data_stringify = JSON.stringify(data);
                var data_json = JSON.parse(data_stringify);
                //Get response status from json data
                var status = data_json["status"];
                console.log(status);
            })
            .fail(function(XMLHttpRequest, textStatus, errorThrown){
                console.log('disp error:'+textStatus);
            });
        })
      
        $('#clear').click(function() {
            console.log('Clear button clicked!');;
            $.ajax({
                type: "GET",
                url: "http://192.168.1.251/disp/%0C",
                dataType: "json",
                timeout: 5000
            })
            .done(function(data){
                console.log('clear success');
                var data_stringify = JSON.stringify(data);
                var data_json = JSON.parse(data_stringify);
                var status = data_json["status"];
                console.log(status);
            })
            .fail(function(XMLHttpRequest, textStatus, errorThrown){
                console.log('clear error:'+textStatus);
            });
        })
    </script>

</body>
</html>