capture_hall_sensor_data
Capture hall sensor readings from a servomotor by setting capture type, channels, time steps per sample, and division factor, returning scaled and averaged data.
Instructions
Start sending hall sensor data (work in progress; don't send this command) [Firmware command "Capture hall sensor data", group: Other.] Parameters:
captureType: Indicates the type of data to capture. Currently 1 to 3 are valid.
nPointsToRead: Number of points to read back from the device
channelsToCaptureBitmask: Channels to capture bitmask. The first three bits are valid, which will turn on (0) or turn off (0) that hall sensor channel
timeStepsPerSample: Aquire a sample every this number of time steps. Time steps happen at the update frequency, which can be read with the Get product specs command
nSamplesToSum: Number of samples to sum together to make one point to transmit back
divisionFactor: Division factor to apply to the sum of the samples to scale it down before transmitting it so that it fits into the returned data type, which is a 16-bit number per each hall sensor Returns:
data: The data of the hall sensors after suming and averaging motor: an alias number (e.g. 88), a 16-hex-digit unique ID (e.g. "0123456789ABCDEF"), or "all" to broadcast to every motor on the bus (broadcasts get no responses back).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| motor | Yes | ||
| captureType | Yes | ||
| nPointsToRead | Yes | ||
| nSamplesToSum | Yes | ||
| divisionFactor | Yes | ||
| timeStepsPerSample | Yes | ||
| channelsToCaptureBitmask | Yes |