Interfacing Proximity sensor with BOLT such that buzzer rings when something is near the sensor and not otherwise

Bolt IoT Platform
    <script>
    setKey('{{ApiKey}}','{{Name}}');
    </script>
</head>
<body>
    <center>
    <button onclick="digitalRead(0);" buzz();>READ</button>
    </center>
</body>

@krishadu97 please share the complete code.
To share the complete code select the code and click on the ‘</>’ button in input box.