LED Control - query

The LED control code example is working fine . Just two queries.

  1. We are connecting the LED to port 0 without any current limiting resistor. Is this a good idea as it can draw quite a bit of current ? I dont see any resistor on board too…

  2. For every ON and OFF operation there is this confirmation message ón a new page - this actually is a nuisance in real terms. Much better would have been a message field that updates the status of the LED on the same page as the control buttons. Or even better a small round patch that turns green when the LED is ON and Black when OFF.

This way i could have directly used the code in a project. I know this can be done in HTML coding but then its a new domain for me :wink:

  1. Yes. It is a good idea to inset a resistor between the LED and GPIO. Though we haven’t faced much issue during testing anytime.

  2. This will be covered in Module 3.

Thanks Pranav… yes it would be a good idea to limit the LED current to not more than 10mA to avoid frying the MCU in the long run.