Skip to content

RB: Set Multible LEDs (binary): EXP Bus Command Reference

Understanding EXP board addressing

This command is used with FAST Expansion and FAST breakout boards via a FAST Serial Protocol (FSP) connection to the EXP Bus. Please read the EXP Overview to understand the operation of these commands and addresses.

This command sets multiple LEDs to be the same target color using binary data.

This is a binary command, meaning its designed to be used by your game software talking to the FAST EXP Bus, rather than for humans using an interactive terminal emulator. (A version of this command that uses all ASCII characters is available via RP:.)

Command Syntax

RB:<count><r><g><b>{<index>...}

<count>

One byte, the binary count of how many LEDs will be updated via this command. This is needed since this command is binary, so the EXP processor needs to know the count of how much binary data to look for before it goes back to looking for ASCII characters. Valid ranges are 0-127 (binary 0x00 - 0x7F) since that's the max LEDs that can be attached to a single breakout board.

<r><g><b>

Each color is a single byte, in the range of 0-255 (binary 0x00 - 0xFF).

<index>

This is the LED number for the LED you want to update. Individual LEDs are accessed via 0-127 (binary 0x00 - 0x7F) since that's the max LEDs that can be attached to a single breakout board.

New in firmware 0.20:

You can also use mapped LED blocks which you configured via the LM: command. In this case, all the LEDs in that set will be updated to the same color as if they were a single LED.

If LED maps have previously been created on the expansion board targetted, then LED indexes 80-FF correspond to the mapped LED sets.

Example

To update the first 5 LEDs on a breakout to yellow (ffff00):

The payload of this command would look like this before it was encoded to bytes:

05FFFF000001020304

Breaking it down:

  • 05 we are updating 3 LEDs in this command
  • FFFF00 yellow target color
  • 0001020304 indices of the first 4 LEDs
  • No <CR> at the end!

But what would actually be sent over the wire is this:

RB:<raw bytes data that would look weird when printed>

Since this command is binary, there are no commas separating indices and no <CR> at the end of it. (The "count" value tells the EXP Processor how many more bytes are coming, so the <CR> is not needed.)

If you have a global fade rate set (via a previously-sent RF: command for the board the LEDs are attached to), then the LEDs will fade to that rate over the given time.

Note this command has a 50ms timeout which cancels it if has not received all of the data within that time.

Return Response

None

N or > jump the next page, P or < for previous, search with S or ?