Unexpected symbol <

Hi
Can you please help me with the error at the first two lines of this code in the controlling Led project where it says - "expected an indentifier, instead saw ‘<’ ".

Hi @jebo22mca,

the error you mentioned might be related to the template placeholders {{ApiKey}} and {{Name}} not being correctly substituted in your actual code. Make sure that these placeholders are replaced with actual values in your code. If they are not replaced, you will see the “expected an identifier, instead saw ‘<’” error.

<!DOCTYPE html>
<html>
<head>
  <title>Bolt IoT Platform</title>
  <script type="text/javascript" src="https://cloud.boltiot.com/static/js/boltCommands.js"></script>
  <script>
    setKey('your_api_key', 'your_device_name');
  </script>
</head>
<body>
  <center>
    <button onclick="digitalWrite(0, 'HIGH');">ON</button>
    <button onclick="digitalWrite(0, 'LOW');">OFF</button>
  </center>
</body>
</html>

Make sure to replace 'your_api_key' and 'your_device_name' with your actual API key and device name in the setKey function call. This should resolve the issue you mentioned.

1 Like