set_all_default_led() / setAllDefaultLED()

Description

This function sets the default LED color of the eyes and arms as well as the mode, so it will remain that color and light pattern even after powering off and back on. The colors are set using RGB values.

Syntax

Python:
set_all_default_led(red, green, blue, mode)
set_all_default_led(red, green, blue, mode, interval)

Arduino:
setAllDefaultLED(red, green, blue, mode)
setAllDefaultLED(red, green, blue, mode, interval)

Parameters

red: int value from 0 to 255
green: int value from 0 to 255
blue: int value from 0 to 255
mode: an enum, which can be selected from the following predefined list: SOLID, STROBE, BLINK, BLINK_DOUBLE(Arduino DOUBLE_BLINK), DIMMING, PULSE, REVERSE_PULSE, OFF
interval: the interval of the light pattern, except for in the case of SOLID. For SOLID mode, this refers to the light's brightness.

Returns

None

Example Code
Python
#Python code
import CoDrone
from CoDrone import Mode

def main():
    drone = CoDrone.CoDrone()
    drone.pair()

    # Sets your LED colors and mode so that they will remain the same even after powering off
    drone.set_all_default_led(255,0,255, Mode.BLINK_DOUBLE)               # change LED to purple blink. 
    drone.set_all_default_led(0, 120, 255, Mode.SOLID, 90)                # change LED to Light blue Solid with 90 bright.

if __name__ == '__main__':
    main()
Arduino
//Arduino code
#include<CoDrone.h>     //header

void setup(){
//open serial and connect
    CoDrone.begin(115200);
    CoDrone.pair(Nearest);

    // It will save LED color and mode that you can see same thing after turn off and on
    CoDrone.setAllDefaultLED(255, 0, 255, DOUBLE_BLINK);       // change LED to purple blink. 
    CoDrone.setAllDefaultLED(0, 120, 255, SOLID, 90);          // change LED to Light blue Solid with 90 bright.
}

void loop(){

}