LED operations
Apply LED effects in all drones
Apply random LED effects in all drones
Apply LED effects in the drones with even ID
Apply LED effects in the drones with odd ID
Apply LED effects in an applied formation
Swarm.ledAll(
effect, red, green, blue
)
Swarm.ledAll(
effect, red, green, blue
)
Parameters:
effect: str
Desired LED effect namered: int
Red value in the RGB scale (0-255)green: int
Green value in the RGB scale (0-255)blue: int
Blue value in the RGB scale (0-255)
Result: Turn on all the drones' LEDs in the RGB selected color and with the chosen effect, the list of the available effects is detailed in the LED Effects section.
Swarm.ledRandom(
effect
)
Swarm.ledRandom(
effect
)
Parameters:
effect: str
Desired LED effect name
Result: Turn on all the drones' LEDs with random colors and with the chosen effect, the list of the available effects is detailed in the LED Effects section.
Swarm.ledEven(
effect, red, green, blue
)
Swarm.ledEven(
effect, red, green, blue
)
Parameters:
effect: str
Desired LED effect namered: int
Red value in the RGB scale (0-255)green: int
Green value in the RGB scale (0-255)blue: int
Blue value in the RGB scale (0-255)
Result: Turn on the LEDs of the drones with even IDs in the RGB selected color and with the chosen effect, the list of the available effects is detailed in the LED Effects section.
Swarm.ledOdd(
effect, red, green, blue
)
Swarm.ledOdd(
effect, red, green, blue
)
Parameters:
effect: str
Desired LED effect namered: int
Red value in the RGB scale (0-255)green: int
Green value in the RGB scale (0-255)blue: int
Blue value in the RGB scale (0-255)
Result: Turn on the LEDs of the drones with odd IDs in the RGB selected color and with the chosen effect, the list of the available effects is detailed in the LED Effects section.
Swarm.ledFormation2D(
effect, L, N
)
Swarm.ledFormation2D(
effect, L, N
)
Parameters:
effect: str
Desired LED effect nameL: int or float
Dimension of the formation side (change for each geometry)N: int
Defines the number of clovers in the formation
Result: Executes a pre-defined LED operation for some of the developed formations.
Last updated