Bolt iot project 3

I have write the exact java script code given in project 3 but my led is not turn on by clicking on ‘led on’ button

Hi Rohini,
Please share the screenshot of your code so that we can get hold of the error !

Hi @Rohini ,
Kindly share your code so I can look into it. Also, please hide any API keys in your code before sharing it on the forum.

If the led is not glowing in that sense, then it would also be due to the improper connnection of the led with the resistor where the either terminal would have not placed in the female socket properly.Or the pin which you have connected the led in bolt iot board would be wrong.

Sir this is my code

And this is output

And my led is not turning on

Hi Rohini,
First of all, to clarify, this is project 8 and not project 3.
Secondly, this is a python code, not javascript.

Now lets come to debugging. I dont see any error in the code. But you are getting rate limited issue. I guess you will have to log out of your server and login only after the duration of 4 hours and 49 minutes has passed.
When you start again, take proper care in following steps-
Make sure that the long leg of LED is perfectly fitted in the female input pin of Bolt wifi module at GPIO pin 0 and the short leg of LED is fitted to the gnd pin.
Next check the Bolt API key and Device ID. It might be that you have entered these wrongly.
Also ensure that your BOLT device shows stable green and blue LED before running the program.

After doing all this, if error still persists, do reply on this thread.

PS: You shared the screenshot without hiding your API Key and DEVICE ID. Anyone can use these credentials. Do not repeat this again.

Sir @bm21mtech14006 my led is not turned on
Even in starting project 3

My code is correct

that why I tried to do it in python on Ubuntu server

Hi Rohini,
Yes, your code seems to be correct. Check your connection.
If connection is also correct, then try pasting the following code and run - -

singleButton({name:“Led On”, action:“digitalWrite”,
pin:“0”, value:“HIGH”,bgcolor:“green”,
shape:“rectangle”,align:“left”,text_color:“white” })

singleButton({name:“Led Off”, action:“digitalWrite”,
pin:“0”, value:“LOW”, bgcolor:“red”,
shape:“rectangle”, align:“left”, text_color:“black”})

singleButton({name:“Fan On”, action:“analogWrite”,
pin:“0”, value:“230”,bgcolor:"#ffa500",
shape:“circle”, align:“right”,text_color:“white” })

singleButton({name:“Fan Off”, action:“analogWrite”,
pin:“0”, value:“0”,bgcolor:"#6a5acd",
shape:“circle”, align:“right”, text_color:“white”})

Sir @bm21mtech14006
my code is correct but when I click in “led on” Button led is not turn on I need this project for my college please help me sir

Hi @Rohini ,
You must have called the API too frequently. There are some API ACCESS RULES that you may check out here. Please go through the rules and modify your code in such a way that you don’t break the rules, otherwise your access will be blocked for 6 hours. If you need more bandwidth, consider upgrading to Bolt Cloud Pro.

Do share your code before you run it again, so it doesn’t get blocked for 6 hours again.

The above code is correct but won’t work until the API gets unlocked, which takes 6 hours from the time it got blocked. Don’t run the code below until you get it checked.

@raghav.srivastava sir now this error is occurred

Sir my connection are correct
Led’S long leg with resistor in pin0
And other leg in gnd

@Rohini this connection is not the wiring connection, it’s something to do with the network and the API itself. I have taken this to the team and we’ll get back to you shortly.

Please @raghav.srivastava sir help me as much quick as you can please sir i need this project in urgent

@Rohini please try again once and let me know if it works. Also, I would recommend you share your code before you run it, so we can optimize the API calls and make sure that your API access is not blocked again.

Hi @Rohini

Usually connection error occurs when there is no internet inside Vmware/virtualbox. To check if internet is working, type the below commands and send the screenshot of the output.


To fix this issue -

Add the dns server and check if it is working.

Open /etc/resolv.conf file using the below command.

sudo nano /etc/resolv.conf

add the below lines in the file.


And then check if pinging to google is working.

No sir @rahul.singh1
its not working

Pls sir do something i need to submit the project please

Hi @Rohini ,

Exit the terminal and ssh into the terminal again. It should work. Also check this link How to Resolve the "Temporary failure in name resolution" Error

Do let me know in case you need further assistance.

Sir by using this my error remove for some time but it again show connection error

Hi @Rohini,
Please reboot your system/VM and try again.
I have notified @rahul.singh1 regarding this and he will help you out shortly.

Thank you @rahul.singh1 sir for your concern