Skip to content

MiP_ChestLED

github-actions[bot] edited this page Aug 11, 2026 · 11 revisions

Class MiP_ChestLED

Manages MiP's three-color chest LED.

Table of Contents


Public Functions

read

Signature: void read(MiPChestLED &chestLED)

Summary: Reads the current RGB state and flash timings of MiP's chest LED.

Parameters:

Parameter Description
chestLED Reference to a MiPChestLED object where retrieved data will be stored.

write

Signature: void write(uint8_t red, uint8_t green, uint8_t blue)

Summary: Sets MiP's chest LED to a solid RGB color and verifies the change.

Details:

Sends the set command and reads back the state from MiP to confirm the color was updated.

Parameters:

Parameter Description
red Red channel intensity (0-255).
green Green channel intensity (0-255).
blue Blue channel intensity (0-255; lower 2 bits truncated by MiP).

write

Signature: void write(uint8_t red, uint8_t green, uint8_t blue, uint16_t onTime, uint16_t offTime)

Summary: Sets MiP's chest LED to flash an RGB color at a specific interval and verifies the change.

Parameters:

Parameter Description
red Red channel intensity (0-255).
green Green channel intensity (0-255).
blue Blue channel intensity (0-255).
onTime Duration in milliseconds the LED stays on (converted to 20ms ticks).
offTime Duration in milliseconds the LED stays off (converted to 20ms ticks).

write

Signature: void write(const MiPChestLED &chestLED)

Summary: Sets MiP's chest LED using a MiPChestLED object and verifies the change.

Parameters:

Parameter Description
chestLED Reference to a MiPChestLED configuration object.

unverifiedWrite

Signature: void unverifiedWrite(uint8_t red, uint8_t green, uint8_t blue)

Summary: Sets MiP's chest LED to a solid RGB color without verification (fire-and-forget).

Parameters:

Parameter Description
red Red channel intensity (0-255).
green Green channel intensity (0-255).
blue Blue channel intensity (0-255).

unverifiedWrite

Signature: void unverifiedWrite(uint8_t red, uint8_t green, uint8_t blue, uint16_t onTime, uint16_t offTime)

Summary: Sets MiP's chest LED to flash an RGB color without verification (fire-and-forget).

Parameters:

Parameter Description
red Red channel intensity (0-255).
green Green channel intensity (0-255).
blue Blue channel intensity (0-255).
onTime Duration in milliseconds the LED stays on.
offTime Duration in milliseconds the LED stays off.

unverifiedWrite

Signature: void unverifiedWrite(const MiPChestLED &chestLED)

Summary: Sets MiP's chest LED using a MiPChestLED object without verification (fire-and-forget).

Parameters:

Parameter Description
chestLED Reference to a MiPChestLED configuration object.

Clone this wiki locally