-51-
v5.8
ON / OFF Button
10.1. External led
ON / OFF button includes a red ring LED, which can be managed by software using dedicated functions described below.
This LED can be used for instance to know that Waspmote is ON, or for debugging purposes at developing phase. By default,
Waspmote Plug & Sense! comes with a code that blinks briefly (3 times in less than one second) this LED when it is turned ON.
The LED can be managed specifying ON time or just setting this state with specific API functions. The user should take into
account that the usage of this LED will increase power consumption due to external LED consumes 4.4 mA.
Figure : Waspmote turned On
External LED ring can be managed with next code lines:
Utils.setExternalLED(LED_ON); // Turns external led ON
Utils.setExternalLED(LED_OFF); // Turns external led OFF
There is also another useful function which blinks external LED during specified time.
Utils.externalLEDBlink(uint_16 time) // Time must be in seconds
Finally, there is an extra function to know the external LED state:
Utils.getExternalLED(); // Read external led state