-
Notifications
You must be signed in to change notification settings - Fork 0
MiP_Motion
Manages MiP's drive, turn, posture, and balance systems.
Signature: void continuousDrive(int8_t velocity, int8_t turnRate)
Summary: Sends continuous drive command (velocity + turn rate).
Details:
Rate-limited internally to avoid overwhelming MiP's UART interface (~20 Hz max). Fire-and-forget command (no read-back verification possible).
Parameters:
| Parameter | Description |
|---|---|
velocity |
Speed/direction (-32 to +32; negative = backward, positive = forward). |
turnRate |
Turn rate/direction (-32 to +32; negative = left, positive = right). |
Signature: void distanceDrive(MiPDriveDirection driveDirection, uint8_t cm, MiPTurnDirection turnDirection, uint16_t degrees)
Summary: Drives a specific distance then optionally turns.
Details:
Fire-and-forget command.
Parameters:
| Parameter | Description |
|---|---|
driveDirection |
Direction to drive (MIP_DRIVE_FORWARD or MIP_DRIVE_BACKWARD). |
cm |
Distance to travel in centimeters (0-255 cm). |
turnDirection |
Turn direction after driving (MIP_TURN_LEFT or MIP_TURN_RIGHT). |
degrees |
Turn angle in degrees (0-360 degrees). |
Signature: void driveForward(uint8_t speed, uint16_t time)
Summary: Drives forward for a limited time at given speed.
Details:
Fire-and-forget command. Duration parameter is internally converted to 7ms hardware ticks (max duration ~1.78 seconds / 1785 ms).
Parameters:
| Parameter | Description |
|---|---|
speed |
Drive speed (0-30). |
time |
Duration in milliseconds (max 1785 ms). |
Signature: void driveBackward(uint8_t speed, uint16_t time)
Summary: Drives backward for a limited time at given speed.
Details:
Fire-and-forget command. Duration parameter is internally converted to 7ms hardware ticks (max duration ~1.78 seconds / 1785 ms).
Parameters:
| Parameter | Description |
|---|---|
speed |
Drive speed (0-30). |
time |
Duration in milliseconds (max 1785 ms). |
Signature: void turnLeft(uint16_t degrees, uint8_t speed)
Summary: Turns left by the specified angle at given speed.
Details:
Fire-and-forget command. Angle parameter is internally converted to 5° hardware units (max angle 1275°).
Parameters:
| Parameter | Description |
|---|---|
degrees |
Turn angle in degrees (max 1275°). |
speed |
Turn speed (0-24). |
Signature: void turnRight(uint16_t degrees, uint8_t speed)
Summary: Turns right by the specified angle at given speed.
Details:
Fire-and-forget command. Angle parameter is internally converted to 5° hardware units (max angle 1275°).
Parameters:
| Parameter | Description |
|---|---|
degrees |
Turn angle in degrees (max 1275°). |
speed |
Turn speed (0-24). |
Signature: void stop()
Summary: Stops all motor motion immediately.
Details:
Fire-and-forget command.
Signature: void fallForward()
Summary: Commands MiP to fall forward onto its face.
Signature: void fallBackward()
Summary: Commands MiP to fall backward onto its back.
Signature: void getUp(MiPGetUp getup=MIP_GETUP_FROM_EITHER)
Summary: Commands MiP to stand up from a fallen position.
Parameters:
| Parameter | Description |
|---|---|
getup |
Which direction/side to attempt getting up from (default = MIP_GETUP_FROM_EITHER). |
Signature: constexpr uint8_t MIP_CMD_CONTINUOUS_DRIVE
Summary: MiP protocol command byte for continuous drive (velocity + turn rate).
Signature: constexpr uint8_t MIP_CMD_DISTANCE_DRIVE
Summary: MiP protocol command byte to drive a specific distance and angle.
Signature: constexpr uint8_t MIP_CMD_TURN_LEFT
Summary: MiP protocol command byte to turn left by a specific angle and speed.
Signature: constexpr uint8_t MIP_CMD_TURN_RIGHT
Summary: MiP protocol command byte to turn right by a specific angle and speed.
Signature: constexpr uint8_t MIP_CMD_DRIVE_FORWARD
Summary: MiP protocol command byte to drive forward for a timed duration.
Signature: constexpr uint8_t MIP_CMD_DRIVE_BACKWARD
Summary: MiP protocol command byte to drive backward for a timed duration.
Signature: constexpr uint8_t MIP_CMD_STOP
Summary: MiP protocol command byte to immediately stop all motor motion.
Signature: constexpr uint8_t MIP_CMD_SET_POSITION
Summary: MiP protocol command byte to force MiP to fall down in a specified direction.
Signature: constexpr uint8_t MIP_CMD_GET_UP
Summary: MiP protocol command byte to command MiP to stand up from a fallen position.
Signature: constexpr uint8_t MIP_CONTINUOUS_DRIVE_DELAY
Summary: Minimum inter-command delay in milliseconds for continuous drive commands (~20 Hz).
🔗 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