1. Home
  2. Docs
  3. MANUALS AND DATASHEETS
  4. Polaris Manual
  5. LED Indicators

LED Indicators

Polaris has a two color LED on the front panel for status indication. In the factory programmed firmware the Green color shows connection status and network activity, while Red is used for power status and various information.

Using the LEDs

Here is an example Arduino sketch that cycles all three colors combinations:

void setup() {  
  // Setup LED (pin as output, initially off)
  pinMode(PIN_POWER_LED, OUTPUT);    // Red
  digitalWrite(PIN_POWER_LED, HIGH);
  pinMode(PIN_USER_LED, OUTPUT);     // Green
  digitalWrite(PIN_USER_LED, HIGH);
}  
 
void loop() {  
  // Make a rainbow cycle    
  digitalWrite(PIN_POWER_LED, LOW);  // Red
  delay(500);  
  digitalWrite(PIN_USER_LED, LOW);   // Yellow (Red + Green)
  delay(500);  
  digitalWrite(PIN_POWER_LED, HIGH); // Green
  delay(500);   
  digitalWrite(PIN_USER_LED, HIGH);  // Off
  delay(500);   
}

Here is an example Zerynth code that does the same:

from fortebit.polaris import polaris

polaris.init()

while True:
    # Make a rainbow cycle
    polaris.ledRedOn()      # Red
    sleep(500)
    polaris.ledGreenOn()    # Yellow (Red + Green)
    sleep(500)
    polaris.ledRedOff()     # Green
    sleep(500)
    polaris.ledGreenOff()   # Off
    sleep(500)

How can we help?