You are reading a single comment by @Qbza and its replies. Click here to read the full conversation.
  • Ok so i have uploaded the script into the puck and changed the buttons onClick function, now when i try to click the advertise button, it is giving me UncaughtSyntaxError.

    I have also corrected the code on the disconnect device button as it has a little spelling mistake.

    The code looks like this now:

    <html>
     <head>
     </head>
     <body>
      <script src="https://www.puck-js.com/puck.js"></­script>
      <button onclick="Puck.write('LED1.set();\n');">O­n!</button>
      <button onclick="Puck.write('LED1.reset();\n');"­>Off!</button>
      <button onClick="Puck.write('NRF.setAdvertising(­[beacon.get("goo.gl/test123")]);\n');">A­dvertise</button>
      
      <button onClick="Puck.disconnect()">Disconnect</­button>
      
      
    </body>
    </html>
    

    I have included the errors i am getting.


    1 Attachment

    • Screenshot 2019-02-13 at 16.45.53.png
About

Avatar for Qbza @Qbza started