-
Notifications
You must be signed in to change notification settings - Fork 0
MiP_ChestLED
MiP_ChestLED provides functions to read from and write to MiP's chest LED, allowing the setting of color and flash time.
Signature: MiP_ChestLED(MiP &mip)
Summary: Constructs the chest LED manager.
Parameters:
| Parameter | Description |
|---|---|
mip |
A reference to the main MiP object to access core services. |
Signature: void read(MiPChestLED &chestLED)
Summary: Reads the current RGB state and flash timings of the chest LED.
Details:
chestLED
A reference to a MiPChestLED object where the retrieved data will be stored.
Parameters:
| Parameter | Description |
|---|---|
chestLED |
A reference to a MiPChestLED object where the retrieved data will be stored. |
Signature: void write(uint8_t red, uint8_t green, uint8_t blue)
Summary: Sets the chest LED to a solid RGB color and verifies the change.
Details:
Sends the set command and immediately reads the state back from the MiP to ensure the color was successfully updated. Retries upon failure.
red
Intensity for the red channel (0-255).
green
Intensity for the green channel (0-255).
blue
Intensity for the blue channel (0-255). Note: MiP truncates the lower 2 bits.
Parameters:
| Parameter | Description |
|---|---|
red |
Intensity for the red channel (0-255). |
green |
Intensity for the green channel (0-255). |
blue |
Intensity for the blue channel (0-255). Note: MiP truncates the lower 2 bits. |
Signature: void write(uint8_t red, uint8_t green, uint8_t blue, uint16_t onTime, uint16_t offTime)
Summary: Sets the chest LED to flash an RGB color at a specific interval and verifies the change.
Details:
red
Intensity for the red channel (0-255).
green
Intensity for the green channel (0-255).
blue
Intensity for the blue channel (0-255).
onTime
Time in milliseconds the LED stays on. (Converted internally to 20ms ticks).
offTime
Time in milliseconds the LED stays off. (Converted internally to 20ms ticks).
Parameters:
| Parameter | Description |
|---|---|
red |
Intensity for the red channel (0-255). |
green |
Intensity for the green channel (0-255). |
blue |
Intensity for the blue channel (0-255). |
onTime |
Time in milliseconds the LED stays on. (Converted internally to 20ms ticks). |
offTime |
Time in milliseconds the LED stays off. (Converted internally to 20ms ticks). |
Signature: void write(const MiPChestLED &chestLED)
Summary: Sets the chest LED to flash an RGB color at a specific interval and verifies the change.
Details:
chestLED
A MiPChestLED instance.
Parameters:
| Parameter | Description |
|---|---|
chestLED |
A MiPChestLED instance. |
Signature: void unverifiedWrite(uint8_t red, uint8_t green, uint8_t blue)
Summary: Sets the chest LED to a solid RGB color without verifying the change.
Details:
This is a "fire-and-forget" method. It sends the command but does not read back the state to check for success, making it faster but less reliable than writeChestLED().
red
Intensity for the red channel (0-255).
green
Intensity for the green channel (0-255).
blue
Intensity for the blue channel (0-255).
Parameters:
| Parameter | Description |
|---|---|
red |
Intensity for the red channel (0-255). |
green |
Intensity for the green channel (0-255). |
blue |
Intensity for the blue channel (0-255). |
Signature: void unverifiedWrite(uint8_t red, uint8_t green, uint8_t blue, uint16_t onTime, uint16_t offTime)
Summary: Sets the chest LED to a solid RGB color without verifying the change.
Details:
This is a "fire-and-forget" method. It sends the command but does not read back the state to check for success, making it faster but less reliable than writeChestLED().
red
Intensity for the red channel (0-255).
green
Intensity for the green channel (0-255).
blue
Intensity for the blue channel (0-255).
onTime
Time in milliseconds the LED stays on. (Converted internally to 20ms ticks).
offTime
Time in milliseconds the LED stays off. (Converted internally to 20ms ticks).
Parameters:
| Parameter | Description |
|---|---|
red |
Intensity for the red channel (0-255). |
green |
Intensity for the green channel (0-255). |
blue |
Intensity for the blue channel (0-255). |
onTime |
Time in milliseconds the LED stays on. (Converted internally to 20ms ticks). |
offTime |
Time in milliseconds the LED stays off. (Converted internally to 20ms ticks). |
Signature: void unverifiedWrite(const MiPChestLED &chestLED)
Summary: Sets the chest LED to a solid RGB color without verifying the change.
Details:
This is a "fire-and-forget" method. It sends the command but does not read back the state to check for success, making it faster but less reliable than writeChestLED().
chestLED
An instance of MiPChestLED.
Parameters:
| Parameter | Description |
|---|---|
chestLED |
An instance of MiPChestLED. |
Signature: constexpr uint8_t MIP_CMD_GET_CHEST_LED
Summary: The MiP protocol command to read the chest LED color.
Signature: constexpr uint8_t MIP_CMD_SET_CHEST_LED
Summary: The MiP protocol command to set the chest LED color.
Signature: constexpr uint8_t MIP_CMD_FLASH_CHEST_LED
Summary: The MiP protocol command to flash the chest LED.
🔗 Quick Links: Main Repository • Report an Issue • Wiki Home
An open-source API for the WowWee MiP Robot. Licensed under Apache-2.0.
- MiP
- MiPChestLED
- MiPClapSettings
- MiPDebug
- MiPHardwareInfo
- MiPHeadLEDs
- MiPIRDongleCode
- MiPSoftwareVersion
- MiPStatus
- MiP_Battery
- MiP_ChestLED
- MiP_Clap
- MiP_EEPROM
- MiP_Gesture
- MiP_HeadLEDs
- MiP_Infrared
- MiP_Mode
- MiP_Motion
- MiP_Odometer
- MiP_Position
- MiP_Radar
- MiP_Serial
- MiP_Shake
- MiP_Sound
- MiP_Version
- MiP_Weight
- MiP_WiFi