Hi, I have a SparkFun Electric Imp breakout board. I uploaded this code and I used one of my LED lying around my room. When I measured the current the board was producing 5mA… Since the suggested current is 16 - 18 mA and voltage is 1.8 to 2.2V I can’t power the LED…
Is there any other ways to power the LED to give the visual reference?
Generally, you don’t just put an LED between power and an IO pin. You should always use a current limiting resistor (this is what gets the 3.3v down to the ~2v of the LED).
With a big old LED like that, and the limited drive of an imp pin, you may be ok though. One thing that’s not going to help you here: you have the LED the wrong way round. Flat side is negative (cathode) and should go to pin9, whereas the other side (anode) would go to 3v3. Worst case: LED is very bright then doesn’t work any more. You have been warned - really, 100 ohms in series with either leg would be best.