This button is used to turn on or off Waspmote. It is a latch type button with two static positions as shown below. In on position, the button remains a bit lower than the LED ring.
The 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.
The 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