====== StepStat ======
Return how many pulses have been generated by the most recent ''StepPulse'' or ''StepAccel'' command on the ''pin''.
===== Syntax =====
from cubloc import StepStat
StepStat(pin: int)
===== Parameters =====
* **pin**: The GPIO pin on which ''StepPulse'' or ''StepAccel'' was used.
===== Return Value =====
Return how many pulses have been generated by the most recent ''StepPulse'' or ''StepAccel'' command on the ''pin''.
===== Exceptions =====
* [[https://docs.micropython.org/en/latest/library/builtins.html#TypeError|TypeError]]: ''pin'' is not an integer.
* [[https://docs.micropython.org/en/latest/library/builtins.html#ValueError|ValueError]]: ''pin'' is outside the supported range.
===== Example =====
from time import sleep_ms
from cubloc import StepStat
# Start the pulse train
StepPulse(15, 2000, 5000)
while True:
sleep_ms(1000)
# Print the number of pulses generated so far
result = StepStat(15)
print(result)
===== Related APIs =====
* [[logicpython:cubloc_api:stepaccel|StepAccel]]
* [[logicpython:cubloc_api:steppulse|StepPulse]]
* [[logicpython:cubloc_api:stepstop|StepStop]]