Functions | |
int | Led_SetActive (int state) |
Sets whether the Led subsystem is active. | |
int | Led_GetActive () |
Read the active state of the LED system. | |
int | Led_SetState (int state) |
Control the LED on the MAKE Controller Board. | |
int | Led_GetState () |
Read the state of the LED on the MAKE Controller Board. |
There are two LEDs on the MAKE Controller Board - one green and one red. The red LED is simply a power indicator and cannot be controlled by the Controller. The green LED can be used for program feedback. In many MakingThings applications, for example, it is set to blink once a second, showing the board's "heartbeat" and letting the user know that the board is running.
int Led_GetActive | ( | void | ) |
Read the active state of the LED system.
int enabled = Led_GetActive(); if(enabled) { // then we're enabled } else { // not enabled }
int Led_GetState | ( | void | ) |
Read the state of the LED on the MAKE Controller Board.
int led_on = Led_GetState(); if(led_on) { // the LED is on } else { // the LED is off }
int Led_SetActive | ( | int | state | ) |
Sets whether the Led subsystem is active.
state | An integer specifying the active state of the LED system - 1 (on) or 0 (off). |
// enable the LED system Led_SetActive(1);
int Led_SetState | ( | int | state | ) |
Control the LED on the MAKE Controller Board.
state | An integer specifying the state - on (1) or off (0). |
// turn the LED on Led_SetState(1);