Skip to content

Configuration

Milan edited this page Feb 10, 2021 · 2 revisions

To generate the user configuration file, just run the project's build task. You should see a new file user_config.ini in the project's root directory.

Sections

PlatformIO

This section provides the option of selecting a build environment.

  • default_envs: You will need to select one and only one environment to build for. All valid environments can be found in the env folder.

Common

This section provides global project configuration options.

  • device_name: Human-readable device name that may appear in LED control software.
    • Default: ArduRGB_board.
    • Allowed: string literal.
  • serial_port: Upload port used for serial ports. Leave empty for automatic detection.
    • Default: .
    • Allowed: string literal.
  • use_ota: Use OTA upload instead of serial for compatible devices.
    • Default: false.
    • Allowed: true, false.
  • ota_port: IP address used for OTA uploads.
    • Default: 0.0.0.0.
    • Allowed: IPv4 address.
  • ota_password: Password used for authenticating OTA upload.
    • Default: pwd.
    • Allowed: string literal.
  • wifi_ssid: Wi-Fi SSID for Wi-Fi enabled devices.
    • Default: ssid.
    • Allowed: string literal.
  • wifi_password: Network password for network-enabled devices.
    • Default: pwd.
    • Allowed: string literal.
  • communication_type: Type of communication between board and client.
    • Default: serial.
    • Allowed: serial.
  • default_brightness: Default LED brightness applied on each boot.
    • Default: 50.
    • Allowed: integer x, 0 ≤ x ≤ 100.

LEDs

This section provides configuration for LED devices connected to your board.

There are 2 ways to configure your LEDs:

  • Use the built-in LED configurator tool.
  • Copy the configuration template manually for all LED devices.

Remember that you'll need to register at least 1 virtual LED strip for each physical LED strip.

Using the Configurator

The LED configurator is registered as a custom project task for each build environment.

To run the configurator, you can either use pio run --target led_config, or alternatively if using PlatformIO IDE, you can also navigate to the desired environment in the task explorer, then run Led Configuration under the Custom category.

Manual Configuration

All physical LED strips must be ordered from lowest to highest index, as well as virtual LED strips.

Within the LEDs section, you'll need to first define a physical LED strip.

physical_strip_0 = 0
physical_pin_0 = 4
physical_type_0 = WS2812
physical_order_0 = RGB
physical_correction_0 =
physical_leds_0 = 0

For the following entries, let x be some integer, starting at 0, representing the index of the current physical LED strip.

  • physical_strip_x: The value of this entry must be x.
    • Default: x.
    • Allowed: x.
  • physical_pin_x: Hardware pin LED strip data line is connected to.
    • Default: 4.
    • Allowed: integer.
  • physical_type_x: Type of LEDs.
  • physical_order_x: Colour order of LEDs.
    • Default: RGB.
    • Allowed: permutation of RGB.
  • physical_correction_x: Colour correction applied to LED strip.
    • Default: .
    • Allowed: CRGB(R, G, B) (R, G, B are bytes), TypicalLEDStrip, TypicalSMD5050, Typical8mmPixel, TypicalPixelString, UncorrectedColor.
  • physical_leds_x: Number of LEDs on the LED strip.
    • Default: 0.
    • Allowed: integer.

After the definition of each physical LED strip, you must define at least 1 virtual strip.

led_strip_0 = 0
led_num_0 = 0
led_delay_0 = 25
led_effect_0 =
led_led_reversed_0 = false

For the following entries, let x be some integer, starting at 0, representing the index of the current virtual LED strip. This index accounts for all virtual LED strips defined, not just those within the same physical LED strip.

  • led_strip_x: Parent physical LED strip for this LED strip.
    • Default: 0.
    • Allowed: integer.
  • led_num_x: Number of LEDs on this virtual LED strip.
    • Default: 0.
    • Allowed: integer.
  • led_delay_x: Time, in milliseconds, between each frame transition in LED effects.
    • Default: 25.
    • Allowed: integer.
  • led_effect_0: Default effect to run on board power-up. Effect arguments can be added, separated by commas.
  • led_reversed_0: Reverse the order in which animations update e.g. change right-to-left to left-to-right.
    • Default: false.
    • Allowed: true, false.

Build

Debug options for building the program.

You shouldn't usually need to change any values here.

  • save_patched: Save patched source files to /patched.
    • Default: true
    • Allowed: true, false.

Clone this wiki locally