Enables or disables BlinkUp™ on a device
Whether BlinkUp configuration should be enabled (
This method can be used to activate or deactivate BlinkUp, both the ability to register a signal from a mobile device and the reporting of the process by way of the device’s BlinkUp status LED. As such, it can be used to prevent re-starting devices from flashing their status LED. This is handy for devices which you would like to operate discreetly.
The call is interpreted differently according to the state of the system. The relevant system states are:
Calls to imp.enableblinkup() are applied only when the imp enters a new systems state. However, calls made during a given state are ‘remembered’ and applied the next time the state changes. Naturally, it is impossible to apply the call before the imp enters the booting phase.
For example, suppose that during BOOTING, the programmer makes the call for BlinkUp configuration to be disabled. For the remainder of the 60 seconds of the booting state, BlinkUp will remain enabled. However, when the state transitions to CONNECTING or to IDLE, then BlinkUp will become disabled.
The behaviour can be summarised as follows:
Note When an imp warm-starts after deep sleep, imp.enableblinkup() will be applied almost immediately because the imp goes straight to the active offline state — Squirrel starts immediately, and BlinkUp will be disabled (or re-enabled) as soon as the virtual machine processes your code’s call to imp.enableblinkup().
The following code, for the impExplorer™ Kit, uses imp.enableblinkup() to disable BlinkUp and thus prevent the Kit’s BlinkUp status LED from flashing when the Kit wakes from the deep sleep state triggered in the last line. As such, the Kit, which is here operating as a sensor node, will not disturb end-users with a periodic flash of the LED.