Board LEDs

Is there a way to access the outputs for the embedded LEDs on the Imp? (card version).


Unfortunately, no. The LED’s and the phototransistor for the blink-up circuit are not available for anything else.

well, you can use the phototransistor for reading of the relative light level.
From the API docs:
// Take a reading of the current light level current_light = hardware.lightlevel();

Ooops… your right… I forgot about that!

That is really too bad that the LEDs are not accessible. They are in the perfect place to be seen once the Imp is plugged in. Please consider this a new feature request.

This has been asked for before, without luck.

In any kind of waking/sleeping program, the LEDs are used regularly, so having them blink other codes would be very confusing at the least. They are a critical piece of the hardware and need to be reserved.

Sorry for the late post, but I have a couple comments…

Unless I have an issue with the few IMP’s I have been playing with the LED’s don’t even work after 30 seconds of operation. I just assumed they were diabled after initial boot/connection to save power. In that case they are ripe for use by programmers.

Following on that, is it not up to the programmer to do a good job of using the LED’s in a way that is not confusing to the end user?

By default, BlinkUp stops after 60 seconds. BlinkUp LEDs are kind of like the signal lights on a car. They are they for a very specific purpose, and you don’t want to mess with that. Besides, you can’t, so it doesn’t matter.

Yep, as jwehr says, there’s too much potential for confusion, especially in commercial products, if people “overload” the LED functions.

Also, they blink for a reason: the phototransistor is saturated when the LEDs are on, so it recognizes the start of a blinkup in the periods when the LED is off.

(blinking = listening for blinkup. off = not listening any more)

however, you can use the blinking led in your code, by using imp.enableblinkup(bool), to have a kind of indicator