LED not glowing

I am unable to on the LED.
Though the Wifi and cloud lights are glowing LED light is not glowing

1 Like

@soumya221999
Could you please tell me that, is the long leg of led is connected to the GPIO pin no. 0 and short leg is inserted in the GND pin. After that you have to write a code to switch on/off the LED inside the course or read the documentation.

Hello @soumya221999
cheak is that your device is link to the product or not?
cheak your code again
Hope this information is useful for you

Where to write the code?

In your product go do code option
In that you write a code

This was just to check the normal working of wifi module that time it should just glow but it isn’t glowing. After the green light comes at the cloud the led should automatically glow.

Check whether:
1.You have inserted the smaller leg of the LED(-ve end) to GND pin of Bolt Wifi Module.
2.Inserted the longer leg of the LED(+ve end) to GPIO 0 pin of the Bolt Wifi Module.
3.There should be 2 buttons(ON & OFF) shown on your mobile screen to control the LED…use them.

If still you aren’t able to control the LED using BOLT mobile app, try reinstalling the app again and connecting your BOLT Wifi Module again using “Add Device” button.

Hope it helps!:smiley:

1 Like

Firstly check whether you have made right connections i.e smaller leg on led to GND pin and longer leg is first connected to resistor and then to GPIO 0 pin.
If it still doesn’t work, then try reconnecting your bolt module using “add device” button through your bolt account.
The last option could be reinstalling bolt iot app again.
Hope it works!:white_check_mark:

The led wont glow automatically soumya.
I will tell you some quick check points that might help you with your query.

  1. Check Your Connections as per instructed in the course i.e long leg of the led should be connected to GPIO 0 pin and the shorter one to GND.
  2. Now if your connections are proper check the code that you are supposed to write in the code section when you add the led product and click on configure.
  3. Further, check that you have linked the product to the Bolt Cloud.

I think if this points are done correctly you will get the led glowing as a result.
I hope my suggestion helps.

1 Like

Sir ,
Step 1: Take one leg of the resistor and wrap it around the longer leg of the LED i.e positive leg.
Step 2: Insert the negative leg of the LED into the ground pin of the Bolt.
Step 3: Insert the other leg of the resistor in digital pin 0 of the Bolt.
May be it will help you .

Heyo @soumya221999

I hope you have already got your L.E.D working but if not then in the image that you posted it is clearly visible that your shorter leg of L.E.D is connected to the GPIO pin as it is tilted towards it.

And as far as I see your image I think that is the only issue & you might not have to reinstall or restart the bolt app as the two L.E.Ds being stable indicates that there is no problem with your connectivity.

So go on and switch the legs of the L.E.D and I am quite sure it will work.
Good Luck

I did the same sir…still LED is not responding to the ON/OFF buttons

Hardware required

The Bolt Wifi module

1 x 330 ohm Resistor

1 x LED

connect the long pin of led to register and put the register to the GPIO pin ( positive ) and small (negative) pin is connected to Ground .
for coding
Step 1: Go to cloud.boltiot.com and create a new product. While creating the product, choose product type as Output Device and interface type as GPIO. After creating the product, select the recently created product and then click on configure icon.

Step 2: Move to the code tab and write the following code to control the LED.

In the header, we will include a javascript file which has some pre-defined function like DigitalRead, digitalWrite etc already hosted on our Bolt Cloud.

Script to be included is given below:

Note: If you want to see the source code of the same open https://cloud.boltiot.com/static/js/boltCommands.js link in the browser.

Now the next step is to set the API key and device name. Syntax for the same is given below:

Note: API key and Device name will be auto-initialized by Bolt cloud. You don’t have to replace the device name and API key in the above code.

Now inside the tag you have to place two buttons, one for turning the LED on and other to turn it off. The syntax for the same is given below:

ON OFF In the above code, we have place 2 buttons and put the text as 'ON' and 'OFF' respectively. You can change the text as per your choice.

Note: We have put both the buttons inside the tag to make the button align center.

Now we have to make these 2 buttons clickable. To do so, we have to call a javascript function named as onclick() which you have already read in lesson ‘Creating your functions in Javascript’. Inside the onclick function, we are calling a function named digitalWrite().

ON

OFF

digitalWrite() function has two parameter. The first parameter is pin number and the second parameter state.

To turn the LED ON, the state would be HIGH and to turn it OFF state would be LOW.

Note: In the above example, the first parameter has value 0 which means LED is connected to pin 0. You can change this value based on your connection where have you connected the LED.

Below is the complete code:

Bolt IoT Platform ON OFF Step 3: Once you have written the complete code in the editor, give the file name as ledcontrol and in the drop-down select the file extension as html. Below is the screenshot how it looks after this step. ![11|690x419](upload://iWuHVvfKyGAcCioCj6354N7kIW6.jpeg) Step 4: Now click on save icon to save the code. Now go back to the dashboard by clicking on 'X' icon.

Step 5: In the products tab, select the product created and then click on the link icon. Select your Bolt device in the popup and then click the ‘Done’ button.

Step 6: Now click on view this device icon to view the page that you have designed. Below is the screenshot of the final output.


hope this will solve your problem

please ensure that the shorter led is connected to the gnd pin
and the longer leg is connected to 0 pin
if you are just testing whether the device works
install the bolt iot app for android
click on the device and play around with the 0 pin button to check the status of the led
if not then you can check the led by a battery and try this code

from boltiot import Bolt
api_key=“0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
device_id=“BOLTxxxx”
mybolt = Bolt(api_key, device_id)
error=’{“success”: “0”, “message”: “A Connection error occurred”}’
offlne=’{“value”: “offline”, “time”: null, “success”: 1}’
result = mybolt.isOnline()
if result == error:
print("\n Checking connections of your computer…")
elif result == offlne:
print("\n Bolt Device is offline…")
else:
response = mybolt.digitalWrite(‘0’,‘HIGH’)

copy this code to your notepad and save it with extension.py
provided you have to install the bolt package and pip3 package via command prompt

Please try to go throught the instructions in the lecture carefully and try to do the same as instructed in the training if all the connections are right and ur code is also right then this might be a bad led

My LED is still not glowing…
I have ensured all these points even I have done the connections again using another LED still it is not working.
PLEASE HELP ASAP.

It is because you have not connected a resistor with LED try connecting it again with a resistor, it is also possible that as you have used it without a resistor the LED is shorted.
I suggest try connecting the buzzer given in the kit if the buzzer is working than the problem is only with LED you are using that LED is not working and if buzzer is not working then the issue is something else.

Please check if you have connected the shorter leg of LED to ground and longer leg of LED to 0 GPIO pin.Once the same is done,click on the module in app,you will find 2 buttons,LED ON and LED OFF,check the same.If the LED still does’nt glow,then check if the LED is working or not.The only reason for the LED not working then is because the LED isn’t in working condition,please use some other LED

Connect a 330 ohm resistor to the positive leg of your led and then insert it into pin no 0. Also check whether you have enable your Api key if not then enable it from Api key section of your bolt cloud . Still your led lights are not glowing check if your connection are properly made or not also don’t forget to link your product

you firstly make sure hardware connections must be correct i.e longer leg of led should be inserted in 0 pin and shorter leg should be inserted in gnd pin. further you also make sure your device is linked to the product you have created on bolt cloud.