Hello, I recently started working on doing the third project - Controlling LED. Initially, after I set up the connections and wrote the code for the project, the LED worked as I expected (both HTML and JS). Now I moved forward to construct a buzzer and for that, I replaced the LED with the buzzer and it also worked correctly (both on and off). I ran the buzzer for 4-5 minutes and after that, I attempted to turn it off by clicking the button ‘Off’ but it didn’t work. I tried clicking the off multiple times but it didn’t help me. I connected the LED now (I just replaced it) and once I connected it, it started to glow and I wasn’t able to turn it off too. Could someone please help me with this? I had not changed the code which I had written for LED when connecting the buzzer to the module.
Note: After all this happened, I turned off my module and made the necessary connections for the LDR, and tested whether it works. Luckily, it worked. The LDR was working perfectly. The buzzer and LED are not working suddenly.
Did you connect the buzzer with the resistor? If that’s the case then a buzzer does not need a resistor. It is mentioned in “Project 5: Assignment - Advanced Graphs and Changing the sound of Buzzer”.
No, I didn’t connect the buzzer in series with the resistor. Everything worked perfectly when I connected initially both the buzzer and led light. Now when I press the off and on the button to turn on the LED or the buzzer, it is not working. I don’t know what is causing this issue. I have neither changed the code nor made any errors in connections of the circuit I am not able to turn on the device even after clicking the on button multiple times…
I ran that project again for more than 5 minutes and I didn’t encounter any problems. In case you haven’t gone through the troubleshooting steps, Here they are from the lesson:
1: Go back to products configuration page and check whether the code that you have written is properly saved or not. If the code is not present, then again copy the code from above and paste in the editor and save the code.
2: Check your connection whether the LED is properly connected or not. Refer the previous lesson for the circuit connections.
3: Check on which pin the LED is connected. Make sure you have passed the same value in
digitalWrite() function as the first parameter.
4: Make sure your API key is enabled. You can check the same by clicking on API icon on the left side of your dashboard.
Oh and I click on the “deploy configuration” button every time I make changes to the code. You can do the same, if you haven’t done it already.
Check if you have exceeded the API limits https://docs.boltiot.com/docs/api-access-rules
Also, try sending the GPIO command directly from the browser https://docs.boltiot.com/docs/write-digital-output-1. Replace your API key and device in the below request and share a screenshot the response.
Do let me know in case you need further assistance.
Thank you, Mr. Rahul Singh. I checked my email, I had received an email from bolt for exceeding some API limit 5 hours ago. Is that the reason behind me not able to work with the LED project? If yes, why am I able to still work with LDR sensor?
Thank you so much sir, could you please answer my reply to your thread (6th thread)
Yes that is the reason why the led was not working. The LDR project was not using any API requests, it is just collecting data, so the LDR should be working without any problems
Check your connection whether the LED is properly connected or not. Refer the previous lesson for the circuit connections
Why is there a delay of 10-11 seconds delay between the LED switching ON/OFF after pressing the buttons on my PC?
This may be the case with high latency/extremely slow internet connections. As the command from your PC has to the Bolt servers over HTTP and then from the servers to the Bolt WiFi Module over MQTT, it may take some time. There might be some congestion on your local network as well.
@khandenathparth most welcome. Do let me know if you need any other help.
This could be the situation if your internet connection has a lot of latency or is exceedingly slow. It may take some time because the command from your PC must be sent via HTTP to the Bolt servers, and then over MQTT from the servers to the Bolt WiFi Module. It’s possible that your local network is also congested.
Maybe you could open browser console and check for errors if any. In my case I was getting error 429 for too many requests.
But after unblocking api it worked.