User Tools

Site Tools

한국어

logicpython:cubloc_api:count

Differences

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

Link to this comparison view

logicpython:cubloc_api:count [2026/04/10 02:06] – created - external edit 127.0.0.1logicpython:cubloc_api:count [2026/04/10 02:58] (current) – removed mfranklin
Line 1: Line 1:
-====== Count ====== 
- 
-Return the current pulse count for the specified counter ''channel''. 
- 
-===== Syntax ===== 
- 
-<code python> 
-from cubloc import Count 
- 
-Count(channel: int) 
-</code> 
- 
-===== Parameters ===== 
- 
-  * **channel**: Counter ''channel'' number (0 to 4). 
- 
-===== Return Value ===== 
- 
-Return the current pulse count for the specified counter ''channel''. 
- 
-===== Exceptions ===== 
- 
-  * [[https://docs.micropython.org/en/latest/library/builtins.html#TypeError|TypeError]]: ''channel'' is not an integer. 
-  * [[https://docs.micropython.org/en/latest/library/builtins.html#ValueError|ValueError]]: ''channel'' is outside the supported range. 
- 
-===== Notes ===== 
- 
-  * Note: Read often enough that the 16-bit hardware counter cannot wrap more than once between reads. 
- 
-===== Example ===== 
- 
-<code python> 
-from cubloc import Count 
- 
-# Example usage 
-result = Count(0) 
-print(result) 
-</code> 
- 
-===== Related APIs ===== 
- 
-  * [[logicpython:cubloc_api:countreset|CountReset]] 
-  * [[logicpython:cubloc_api:freqout|FreqOut]] 
-  * [[logicpython:cubloc_api:pwm|Pwm]] 
-  * [[logicpython:cubloc_api:pwmoff|PwmOff]] 
-  * [[logicpython:cubloc_api:setcount|SetCount]] 
  
logicpython/cubloc_api/count.1775786798.txt.gz · Last modified: by 127.0.0.1