-
Notifications
You must be signed in to change notification settings - Fork 0
MiP_HeadLEDs
Manages MiP's eye LEDs.
Signature: constexpr uint8_t MIP_CMD_SET_HEAD_LEDS
Summary: MiP protocol command bytes used by the head LED subsystem.
Details:
These values are placed in the first byte of requests sent to the MiP (and appear in the corresponding responses). See the official MiP BLE Protocol for the complete list.
Signature: constexpr uint8_t MIP_CMD_GET_HEAD_LEDS
Signature: MiP_HeadLEDs(MiP &mip)
Summary: Constructs the eye LED manager.
Parameters:
| Parameter | Description |
|---|---|
mip |
A reference to the main MiP object to access core services. |
Signature: void read(MiPHeadLEDs &headLEDs)
Summary: Reads the current state of all four head LEDs.
Details:
Performs a verified read with retries on communication failure.
Parameters:
| Parameter | Description |
|---|---|
headLEDs |
Reference to a MiPHeadLEDs struct to fill. |
Signature: void write(MiPHeadLED led1, MiPHeadLED led2, MiPHeadLED led3, MiPHeadLED led4)
Summary: Sets all four head LEDs and verifies the change.
Details:
Sends the command and reads back the state to confirm success. Retries automatically on mismatch or 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.
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 but provides no confirmation that the command succeeded.
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.
Parameters:
| Parameter | Description |
|---|---|
headLEDs |
Struct containing the four LED patterns. |
🔗 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