Skip to main content

LED Pattern

This block is used to set the LED pattern.

LED Pattern Block

The pat.play method allows you to load a new LED pattern to play on the currently selected LED channel. The pattern is defined using a string with specific characters:

  • -: both LEDs off
  • R or r: red LED on
  • G or g: green LED on
  • B or b: both LEDs on
  • ~: looped pattern (can be placed anywhere in the pattern string)
  • *: double-speed pattern (can be placed anywhere, use twice for 4x speed)

The method takes two parameters:

  1. pattern: The pattern string (max length: 16 steps)
  2. patint: Defines if the method can interrupt another pattern
    • 0 (PL_PAT_NOINT): cannot interrupt
    • 1 (PL_PAT_CANINT): can interrupt

The pattern is played on the Status LEDs

LED Pattern Block