AnuradhaVinayak Shantaram Joshi
Published

Desk Buddy Using Bolt IoT

Build your own Desk Buddy to help notify the presence/absence of your co-workers.

EasyProtip30 minutes193
Desk Buddy Using Bolt IoT

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
LED (generic)
LED (generic)
×2

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud

Story

Read more

Schematics

Circuit Diagram for Desk Buddy setup

The Bolt has to be connected to an appropriate power source.
Hackster ns3oaobvdy

Code

Desk_Buddy

HTML
Here is a code for the Project. It uses basic HTML and CSS and Javascript. You can use a text style of your choice.
<html>
<head>
<style>
.buttonPresent {
    background-color: #a6ff4d;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 12px;
}

.buttonAbsent {
    background-color: #ffff1a;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 12px;
}

</style>
  <!-- In following  line will load the boltCommands.js files from Bolt cloud.-->
  <script type="text/javascript" src="https://cloud.boltiot.com/static/js/boltCommands.js">
  </script>

  <script type="text/javascript">
    // The following line will set the api key and device name. It will be auto-initialized by Bolt cloud.
    setKey('{{ApiKey}}','{{Name}}');
    setDebug(false);
    // Function defination for employee Presence
    function present(){
        digitalWrite(0, 'HIGH');
        digitalWrite(1,'LOW');
    }
    // Function defination for employee Absence
    function absent(){
      digitalWrite(0, 'LOW');
      digitalWrite(1,'HIGH');
      digitalWrite(2,'LOW'); 
    }
</script>
</head>

<body>
    <div class="background">
<center>
  <!-- In below line, We are calling the 'present' function defined in the javascript above,
  to switch on the Green LED. -->
  <button onclick="present()" class="buttonPresent">Present</button>

  <!-- In below line, we are calling the 'absent' function defined in the javascript above,
  to switch on the RED LED. -->
  <button onclick="absent()" class="buttonAbsent">Away</button>

</center>
</div>
</body>
</html>

Credits

Anuradha

Anuradha

3 projects • 0 followers
I enjoy anything that gives me a work high, such as Hackathons.
Vinayak Shantaram Joshi

Vinayak Shantaram Joshi

9 projects • 10 followers

Comments