User Tools

Site Tools

한국어

logicpython:cubloc_api:stepstat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
logicpython:cubloc_api:stepstat [2026/04/22 05:23] – [Example] mfranklinlogicpython:cubloc_api:stepstat [2026/04/22 05:33] (current) – [Example] mfranklin
Line 1: Line 1:
 ====== StepStat ====== ====== StepStat ======
  
-Return how many pulses have been generated by the most recent ''StepPulse'' or ''StepAccel'' command on the ''channel''.+Return how many pulses have been generated by the most recent ''StepPulse'' or ''StepAccel'' command on the ''pin''.
  
 ===== Syntax ===== ===== Syntax =====
Line 13: Line 13:
 ===== Parameters ===== ===== Parameters =====
  
-  * **pin**: Pin number on which pulse train was started with ''StepPulse'' or ''StepAcce''.+  * **pin**: The GPIO pin on which ''StepPulse'' or ''StepAccel'' was used.
  
 ===== Return Value ===== ===== Return Value =====
Line 27: Line 27:
  
 <code python> <code python>
 +from time import sleep_ms
 from cubloc import StepStat from cubloc import StepStat
  
 +# Start the pulse train
 StepPulse(15, 2000, 5000) StepPulse(15, 2000, 5000)
-result = StepStat(15) 
-print(result) 
  
 while True: while True:
-    pass+    sleep_ms(1000) 
 +     
 +    # Print the number of pulses generated so far 
 +    result = StepStat(15) 
 +    print(result) 
 </code> </code>
  
logicpython/cubloc_api/stepstat.1776835420.txt.gz · Last modified: by mfranklin