Files
2026-07-13 13:13:17 +08:00

109 lines
4.7 KiB
Plaintext

{
"FormatVersion": 3,
"Id": "7f3a2c10-5b84-4e29-9a6d-1c7e0b45d832"/*StepperSerialOutput*/,
"Description": "Streams per-axis stepper velocities to an ESP32 over USB serial.\n\nSends a compact \"Stp\" packet every Update carrying three signed velocities (deg/s at the motor shaft), matching the stepper channel of the FastLight firmware that drives 28BYJ-48 motors on ULN2003 boards. Shares one COM port with [WLedSerialOutput]: LED frames and motor packets interleave on the same wire.\n\nVelocities are setpoints, not move targets - each motor runs at the last commanded speed until a new packet arrives. The firmware stops all motors if packets stop for ~250ms, so a hung host or unplugged cable can't leave the stage drifting.\n\nTips:\n- Speeds are in degrees/second at the motor shaft, converted to step timing via `StepsPerRevolution` (28BYJ-48 half-step ~= 4096). The rubber-band pulley ratio is not modeled here; account for it upstream if you want knob-referenced speeds.\n- `MaxSpeed` clamps each axis (deg/s) to keep commands inside the motor's reliable range; the 28BYJ-48 stalls past roughly 50-60 deg/s at 5V.\n- Sign selects direction. Feed a SpaceMouse / slider axis through a [Remap] with a deadzone for jog-style control.\n- The op auto-reconnects (every 2s) when the cable is unplugged and replugged. Status shows on the warning-icon next to the op.\n\nAKA: stepper, motor, 28byj-48, uln2003, microscope, jog",
"InputUis": [
{
"InputId": "2c4e6a80-0001-4f10-9c30-aa0000000001"/*SpeedX*/,
"Position": {
"X": -200.0,
"Y": 0.0
},
"Description": "Velocity of motor 0 in degrees/second at the motor shaft. Sign sets direction.",
"Min": -60.0,
"Max": 60.0,
"ClampMin": true,
"ClampMax": true
},
{
"InputId": "2c4e6a80-0002-4f10-9c30-aa0000000002"/*SpeedY*/,
"Position": {
"X": -200.0,
"Y": 75.0
},
"Description": "Velocity of motor 1 in degrees/second at the motor shaft. Sign sets direction.",
"Min": -60.0,
"Max": 60.0,
"ClampMin": true,
"ClampMax": true
},
{
"InputId": "2c4e6a80-0003-4f10-9c30-aa0000000003"/*SpeedZ*/,
"Position": {
"X": -200.0,
"Y": 150.0
},
"Description": "Velocity of motor 2 in degrees/second at the motor shaft. Sign sets direction.",
"Min": -60.0,
"Max": 60.0
},
{
"InputId": "2c4e6a80-0004-4f10-9c30-aa0000000004"/*StepsPerRevolution*/,
"Position": {
"X": -200.0,
"Y": 250.0
},
"Description": "Steps per full output revolution, used to convert deg/s to step timing. 28BYJ-48 in half-step mode is ~4096 (its gearbox is ~1:63.7, so the true value is ~4076; 4096 is close enough for open-loop jogging)."
},
{
"InputId": "2c4e6a80-0005-4f10-9c30-aa0000000005"/*MaxSpeed*/,
"Position": {
"X": -200.0,
"Y": 325.0
},
"Description": "Clamps the magnitude of each axis (deg/s) before sending. Keeps commands inside the motor's reliable range - the 28BYJ-48 stalls past roughly 50-60 deg/s at 5V.",
"Min": 0.0,
"Max": 360.0
},
{
"InputId": "2c4e6a80-0006-4f10-9c30-aa0000000006"/*PortName*/,
"Position": {
"X": -200.0,
"Y": 450.0
},
"Description": "The COM port the ESP32 is on, e.g. 'COM3'. The dropdown lists detected serial devices.",
"Usage": "CustomDropdown"
},
{
"InputId": "2c4e6a80-0007-4f10-9c30-aa0000000007"/*BaudRate*/,
"Position": {
"X": -200.0,
"Y": 525.0
},
"Description": "Serial baud rate. Must match the firmware (FastLight default is 115200)."
},
{
"InputId": "2c4e6a80-0008-4f10-9c30-aa0000000008"/*Sending*/,
"Position": {
"X": -200.0,
"Y": 600.0
},
"Description": "While true, the op holds the serial port open and pushes a velocity packet on every Update; auto-recovers if the cable is unplugged. Toggle off to release the port; the firmware watchdog then stops the motors."
},
{
"InputId": "2c4e6a80-0009-4f10-9c30-aa0000000009"/*Reconnect*/,
"Position": {
"X": -200.0,
"Y": 675.0
},
"Description": "Trigger button: forces the connection to be torn down and reopened on the next frame. Useful when the link is wedged but `Sending` is still true. Auto-resets to false after firing."
}
],
"SymbolChildUis": [],
"OutputUis": [
{
"OutputId": "9c2e1b44-6a31-4d58-b7e0-2f5a8c91d3e6"/*Result*/,
"Position": {
"X": 300.0,
"Y": 200.0
}
},
{
"OutputId": "3d8f7a21-9b04-4c6e-8a15-7e2d9f0b6c43"/*IsConnected*/,
"Position": {
"X": 300.0,
"Y": 300.0
}
}
]
}