-
Notifications
You must be signed in to change notification settings - Fork 0
MiP_HeadLEDs
Manages MiP's eye/head LEDs.
Signature: void read(MiPHeadLEDs &headLEDs)
Summary: Reads the current state of all four head LEDs.
Details:
Sends the get head LEDs request over UART and populates headLEDs with the active lighting pattern of each LED. Performs retries automatically on communication failure.
Parameters:
| Parameter | Description |
|---|---|
headLEDs |
Reference to a MiPHeadLEDs struct to populate with retrieved states. |
Signature: void write(MiPHeadLED led1, MiPHeadLED led2, MiPHeadLED led3, MiPHeadLED led4)
Summary: Sets all four head LEDs and verifies the change.
Details:
Sends the set command and immediately reads back the state to confirm success. Retries automatically on mismatch or communication error.
Parameters:
| Parameter | Description |
|---|---|
led1 |
Head LED 1 pattern. |
led2 |
Head LED 2 pattern. |
led3 |
Head LED 3 pattern. |
led4 |
Head LED 4 pattern. |
Signature: void write(const MiPHeadLEDs &headLEDs)
Summary: Sets all four head LEDs using a struct and verifies the change.
Details:
Sends the set command and immediately reads back the state to confirm success. Retries automatically on mismatch or communication error.
Parameters:
| Parameter | Description |
|---|---|
headLEDs |
Struct containing the four LED patterns. |
Signature: void unverifiedWrite(MiPHeadLED led1, MiPHeadLED led2, MiPHeadLED led3, MiPHeadLED led4)
Summary: Sets all four head LEDs without verification (fire-and-forget).
Details:
Faster than the verified version because it does not perform a read-back check, but provides no confirmation that the command succeeded on hardware.
Parameters:
| Parameter | Description |
|---|---|
led1 |
Head LED 1 pattern. |
led2 |
Head LED 2 pattern. |
led3 |
Head LED 3 pattern. |
led4 |
Head LED 4 pattern. |
Signature: void unverifiedWrite(const MiPHeadLEDs &headLEDs)
Summary: Sets all four head LEDs using a struct without verification (fire-and-forget).
Details:
Faster than the verified version because it does not perform a read-back check, but provides no confirmation that the command succeeded on hardware.
Parameters:
| Parameter | Description |
|---|---|
headLEDs |
Struct containing the four LED patterns. |
Signature: constexpr uint8_t MIP_CMD_SET_HEAD_LEDS
Summary: MiP protocol command byte to set the patterns of all four head LEDs.
Signature: constexpr uint8_t MIP_CMD_GET_HEAD_LEDS
Summary: MiP protocol command byte to query the current patterns of all four head LEDs.
🔗 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