Vinayak Shantaram JoshiSourabh Tiwari
Published © GPL3+

IoT-Enabled LCD Display

Want data at a quick glance? This project helps you set up internet connected display, which you can control over the Internet.

BeginnerProtip1 hour17,263
IoT-Enabled LCD Display

Things used in this project

Story

Read more

Schematics

Bolt To Arduino To I2C LCD

This is a Fritzing schematic required for connecting the Bolt to the Arduino alongs with an I2C LCD

Schematic in Fritzing

Checkout the image for an easy way to do all the connections.

Code

API String generator

HTML
This code helps the user to generate an API call string, which sends text data out via the uart of the Bolt Wifi unit.
<!DOCTYPE html>
<html>
    <head>
        <title>Lcd Display Interface</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
    </head>
    <body>
        <div >Only enter numerical part of the bolt id. For example if you want to send data device with id BOLT452317, then enter 452317</div><br>
        <div>Bolt ID:<input type="Text" id="boltid" placeholder="xxxx"></div><br>
        <div>API key:<input type="Text" id="apikey" placeholder="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"></div><br>
        <div >Enter the message you want to display below</div><br>
        <input id="command" type="text" size="40"><br>
        <button onclick="SendCommand()">Send</button><br>
        <div id="display"></div><br>
        <div id="commandstatus"></div><br>
        <div id="commandvalue"></div><br>
        <script>
            link="";
            function SendCommand(){
                var apikey=document.getElementById('apikey').value;
                var devicename=document.getElementById("boltid").value;
                var command=document.getElementById('command').value;
                link="https://cloud.boltiot.com/remote/"+apikey+"/serialWrite?data="+command+"&till=10&baud=9600&deviceName=BOLT"+devicename;
                if(apikey==""){
                    document.getElementById('commandstatus').innerHTML="Please enter an api key"
                    return;
                }
                if(devicename==""){
                    document.getElementById('commandstatus').innerHTML="Please enter a device name"
                    return;
                }
                if(command==""){
                    document.getElementById('commandstatus').innerHTML="Please enter some data"
                    return;
                }
                $.get(link,function(success,value){
                    if(value=="success"){
                        if(success['success']==1){
                            document.getElementById('commandstatus').innerHTML="The link was successful";
                            document.getElementById('display').innerHTML="This is the link <a href=\""+link+"\">"+link+"</a>";
                        }else{
                            document.getElementById('commandstatus').innerHTML=success['value'];
                        }
                    }else{
                        document.getElementById('commandstatus').innerHTML="Please check the api key entered"
                    }
                });
            }
        </script>
    </body>
</html>

Arduino Code

This code runs on the Arduino and sends any data available on the UART to the connected I2C-LCd

Credits

Vinayak Shantaram Joshi

Vinayak Shantaram Joshi

11 projects • 64 followers
Sourabh Tiwari

Sourabh Tiwari

2 projects • 25 followers
Software Developer
Thanks to Rahul Singh and Mayank Joneja.

Comments