Defines the SysexCommands enum which lists the commands which are available to send a Stepper Controller over Firmata.
More...
#include <stdint.h>
Go to the source code of this file.
Defines the SysexCommands enum which lists the commands which are available to send a Stepper Controller over Firmata.
◆ SysexCommands
Lists the command IDs and associated requirements which can be sent over Firmata to a Stepper Controller.
Enumerator |
---|
ARDUINO_ECHO | Respond back with the payload.
- Parameters
-
payload | a byte array of any length |
- Returns
payload exactly as it was received
|
SET_SPEED | Sets the speed of a motor.
- Parameters
-
motor_id | [uint8_t] the ID of the motor to control |
speed | [int16_t] the signed speed to set the motor to, in 1/10 RPM |
- Returns
- [uint8_t] motor_id,
[int16_t] speed
|
GET_SPEED | Gets the current speed of a motor.
- Parameters
-
motor_id | [uint8_t] the ID of the motor to query |
- Returns
- [uint8_t] motor_id,
[int16_t] speed
|
SEND_STEP | Moves a motor a specific number of steps.
Direction is controlled by the sign of the speed. - Parameters
-
motor_id | [uint8_t] the ID of the motor to control |
num_steps | [uint16_t] the number of steps to move |
speed | [int16_t] the signed target speed to move the motor at, in 1/10 RPM |
- Returns
- [uint8_t] motor_id,
[uint16_t] num_steps,
[int16_t] speed
|
SEEK_POS | Moves a motor to a specific step position.
The motor will be moved until GET_POS reflects the requested position. Since this command seeks a position, the sign of the speed is ignored. - Parameters
-
motor_id | [uint8_t] the ID of the motor to control |
position | [int32_t] the target position in number of steps from the motor's zero point |
speed | [int16_t] the signed target speed to move the motor at, in 1/10 RPM |
- Returns
- [uint8_t] motor_id,
[int32_t] position,
[int16_t] speed
|
GET_POS | Gets the current number of steps from the zero point for a motor.
- Parameters
-
motor_id | [uint8_t] the ID of the motor to query |
- Returns
- [uint8_t] motor_id,
[int32_t] position,
|
SET_GRIPPER | Sets the target position of the gripper servo.
The servo is controlled such that [0, 180] maps the entire servo range, meaning that a position of 180 may correspond to 90°, 180°, 270°, etc. based on the particular servo attached. Values greater than 180 are ignored. - Parameters
-
position | [uint8_t] the position of the servo, where [0, 180] maps the entire servo range |
- Returns
- [uint8_t] position
|