Skip to content

MiP_Weight

github-actions[bot] edited this page Aug 10, 2026 · 9 revisions

Class MiP_Weight

Manages reading the MiP robot's weight sensor.

Table of Contents


Constructors & Destructors

MiP_Weight

Signature: MiP_Weight(MiP &mip)

Summary: Constructs the Weight manager.

Parameters:

Parameter Description
mip A reference to the main MiP object for core services.

Public Functions

processEvent

Signature: void processEvent(int8_t weightValue)


read

Signature: int8_t read()

Summary: Reads the current weight on the MiP's weight sensor.

Details:

Uses cached data from recent OOB events if available; otherwise performs a verified read with automatic retries.

Returns: Current weight in grams (signed), or 0 on error.


Public Variables

MIP_CMD_GET_WEIGHT

Signature: constexpr uint8_t MIP_CMD_GET_WEIGHT

Summary: MiP protocol command bytes used by the weight detection 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.


Clone this wiki locally