====== StepAccel ======
Output an accelerated, finite pulse train on the specified ''pin'' using a PIO state machine.
===== Syntax =====
from cubloc import StepAccel
StepAccel(
pin: int,
freqBase: int,
freqTop: int,
freqAccel: int,
qty: int)
===== Parameters =====
* **pin**: Output GPIO pin number.
* **freqBase**: Starting pulse frequency in pulses per second.
* **freqTop**: Final pulse frequency after acceleration.
* **freqAccel**: Acceleration rate in pulses per second per second. Must be > 0 when ''freqBase'' < ''freqTop''.
* **qty**: Number of pulses to output.
===== Exceptions =====
* [[https://docs.micropython.org/en/latest/library/builtins.html#TypeError|TypeError]]: An argument has an invalid type.
* [[https://docs.micropython.org/en/latest/library/builtins.html#ValueError|ValueError]]: ''channel'' or a numeric argument is outside the supported range.
===== Notes =====
* Note: Acceleration is implemented as a staircase of fixed-frequency PIO segments, so small gaps can occur when the next segment is reconfigured.
===== Example =====
from cubloc import StepAccel
StepAccel(15, 1000, 5000, 2000, 50000)
while True:
pass
===== Related APIs =====
* [[logicpython:cubloc_api:steppulse|StepPulse]]
* [[logicpython:cubloc_api:stepstat|StepStat]]
* [[logicpython:cubloc_api:stepstop|StepStop]]