Led control project error

the led is not switching on , i have checked the connections more than 5 times and have also replaced the led , the code is also correct.

@mihirshambir

Can you share the code as well as a photo of the circuit?

Also can you hit below link from your browser?
Make sure your device is online and replace api key and device name in below link with your own details.

https://cloud.boltiot.com/remote/YOUR_API_KEY/digitalWrite?pin=0&state=HIGH&deviceName=YOUR_DEVICE_NAME

Share the output after you have made the call in the browser.

There must be a error in the code plz send a screenshot of the code.
Try to change the led it can be a faulty led.

you need to check your connections again and make sure your API is enabled.

1 Like

Even I have the same issue about the led not turning on . I replaced LEDs and checked the code again . Please help me.

@rusafidt

Can you share your code?

<head>

    <title>Bolt IoT Platform</title>

    <script type="text/javascript" src="https://cloud.boltiot.com/static/js/boltCommands.js"></script>

    <script>

    setKey('{{ApiKey}}','{{Name}}');

    </script>

</head>

<body>

    <center>

    <button onclick="digitalWrite(0, 'HIGH');">ON</button>

    <button onclick="digitalWrite(0, 'LOW');">OFF</button>

    </center>

</body>

Hello @rusafidt hope you are doing well !
If your circuit connection is fine and your device API is also enable, then you have done a lot of it.

Now try putting the zeroes of digitalWrite in between single quotes like this —> digitalWrite(‘0’,‘HIGH’); and digitalWrite(‘0’,‘HIGH’);

Here is my code --> check it out and let me know if it works

Hi @mihirshambir !
Please share a screenshot of the code, or use the code to check if yours is correct.
Please do revert back if it works.

hi @rusafidt,You might have been rate limited i.e you will have to do it again after sometime.
steps to check if u r rate limited:

Step 1:click on the ON button.
step 2:Go to console and see if u have the issue as shown below.

                                                or


Step 3:If yes,click on the link provided in black text.You will be directed to another web page which shows the time you have to wait to redo your ledcontrol project.Below is the image of the same.

                                                             or


Here click on the ‘digitalwrite…’ sentence(red color) and it will show u the remaining time.

Hope this helps!!

1 Like

@adeeshdesai

I think there is an error in his code.
He has to put the 0 of digitalWrite in a single quote.
Like this: digitalWrite(‘0’,‘HIGH’);
digitalWrite(‘0’‘LOW’);

@francoisgonothitoure
single quotes is not necessary.
It is not used in code given by the platform and i got it right without those.
I tried with single quotes and it still says rate limited for a couple of hours.
i’ll try after that and let you know.

1 Like

Sure @adeeshdesai no problem.
I will be waiting for you.

Well, this was exactly my problem. I was experimenting with different analog values ranging from 0 to 230 to 300. In that process, I made multiple API requests to bolt cloud which led to the rate limiting. I thought I blew up my pin0 with a high voltage of 300 so I tried with different pins (pin1,pin2, etc). Thanks Adeesh, for spotting the problem in my case. It was of great help.

1 Like

i’m Glad i could help!

I did all of this and none of them worked for me.

It isnt showing rate limited. It is showing something like this.

@rusafidt
Well it means the server couldn’t find response to ur request.
What does it show when u click on either of the links given there??

@rusafidt

Can you share the code that you have written?

I have written above. Thats the only code i written