Swarm In Blocks
  • ▶️introduction
    • Swarm in Blocks
    • What's new?
    • The Atena Team
  • ⚙️Installation
    • How to install Swarm in Blocks?
      • Virtual Machine
      • Native Installation
      • Network configuration
  • 💻Usability
    • Python API
      • Starting modes
      • Basic swarm operations
      • LED operations
      • Formations operations
      • Transformations operations
    • Web API
      • Homepage
      • Swarm Clover Blocks
      • Swarm Station
    • Launch modes
  • 📚Background theory
    • Overview
      • Swarm manipulation
      • ROS architecture
      • Clover adaptation
    • Systems
      • Formations
        • Alphabet
        • Formation 3D
      • Transformations
      • Collision Avoidance
      • LED Effects
      • Swarm Preview
      • First Person View (new)
  • 📖Cases
    • Examples
    • Show-off
  • 🚀Applications
    • Education
    • Commercial
  • 🔒CLOSURE
    • Conclusion
    • References
Powered by GitBook
On this page
  1. Usability
  2. Python API

LED operations

PreviousBasic swarm operationsNextFormations operations

Last updated 3 years ago

Function
Description

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)

  • Parameters:

    • effect: str Desired LED effect name

    • red: 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 .

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 .

Swarm.ledEven(effect, red, green, blue)

  • Parameters:

    • effect: str Desired LED effect name

    • red: 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)

Swarm.ledOdd(effect, red, green, blue)

  • Parameters:

    • effect: str Desired LED effect name

    • red: 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)

Swarm.ledFormation2D(effect, L, N)

  • Parameters:

    • effect: str Desired LED effect name

    • L: 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.

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 .

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
LED Effects section
LED Effects section
LED Effects section
ledAll
ledRandom
ledEven
ledOdd
ledFormation2D