-
Notifications
You must be signed in to change notification settings - Fork 0
MiP_Infrared
Manages MiP's infrared system.
Signature: constexpr uint8_t MIP_CMD_RECEIVE_IR_DONGLE_CODE
Summary: MiP protocol command bytes used by the infrared 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_DETECTED_MIP
Signature: constexpr uint8_t MIP_CMD_SET_DETECTION_MODE
Signature: constexpr uint8_t MIP_CMD_SET_IR_REMOTE_CONTROL
Signature: constexpr uint8_t MIP_CMD_GET_IR_REMOTE_CONTROL
Signature: constexpr uint8_t MIP_CMD_SEND_IR_DONGLE_CODE
Signature: constexpr uint8_t MIP_IR_DETECTION_MODE_DISABLE
Summary: Infrared mode definitions.
Signature: constexpr uint8_t MIP_IR_REMOTE_CONTROL_DISABLE
Signature: constexpr uint8_t MIP_IR_REMOTE_CONTROL_ENABLE
Signature: MiP_Infrared(MiP &mip)
Summary: Constructs the infrared manager.
Parameters:
| Parameter | Description |
|---|---|
mip |
A reference to the main MiP object to access core services. |
Signature: void enableMiPDetectionMode(uint8_t id, uint8_t txPower)
Summary: Enables MiP detection mode (allows detecting other MiPs via IR).
Parameters:
| Parameter | Description |
|---|---|
id |
Unique ID for this MiP (used in detection events). |
txPower |
Transmit power level (1-120). |
Signature: void disableMiPDetectionMode()
Summary: Disables MiP detection mode.
Signature: bool isMiPDetectionModeEnabled()
Summary: Checks if MiP detection mode is currently enabled.
Returns: true if detection mode is active.
Signature: uint8_t readDetectedMiP()
Summary: Reads the next detected MiP event.
Details:
Processes pending serial data first.
Returns: ID of the detected MiP, or 0 if none available.
Signature: uint8_t availableDetectedMiPEvents()
Summary: Returns the number of unread detected MiP events.
Details:
Processes pending serial data first.
Returns: Number of available detection events.
Signature: void enableRemoteControl()
Summary: Enables IR remote control mode.
Details:
Verified operation (command + read-back with retry).
Signature: void disableRemoteControl()
Summary: Disables IR remote control mode.
Details:
Verified operation (command + read-back with retry).
Signature: bool isRemoteControlEnabled()
Summary: Checks if IR remote control mode is enabled.
Returns: true if IR remote control is active.
Signature: void sendDongleCode(const MiPIRDongleCode &irCode, uint8_t transmitPower)
Summary: Transmits a 2-, 3-, or 4-byte IR dongle code (fire and forget).
Details:
No verification is performed as there is no reliable feedback mechanism.
Parameters:
| Parameter | Description |
|---|---|
irCode |
Struct containing code value and byte length (2, 3, or 4). |
transmitPower |
Transmit power level (1-120). |
Signature: void sendDongleCode(uint32_t code, uint8_t length, uint8_t transmitPower)
Summary: Transmits a variable-length IR dongle code using direct values.
Parameters:
| Parameter | Description |
|---|---|
code |
Up to 32-bit IR code value. |
length |
Code length in bytes (2, 3, or 4). |
transmitPower |
Transmit power level (1-120). |
Signature: MiPIRDongleCode readDongleCode()
Summary: Reads the next received IR dongle code from the queue.
Returns: MiPIRDongleCode struct containing the code and its byte length. Returns an empty struct (length = 0) if no event is available.
Signature: uint8_t availableCodeEvents()
Summary: Returns the number of unread IR dongle code events.
Details:
Processes pending serial data first.
Returns: Number of available IR code events.
Signature: void processEvent(uint8_t command, const uint8_t *payload, size_t length)
🔗 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