hw_output_duty()

Returns the duty cycle of a specified output pin.

Syntax

planetcnc.hw_output_duty(index)

Parameters

Parameter Type Description Comment
index int The output pin index. Must be within valid range.

Return Value

Examples

#! /usr/bin/env python
 
import planetcnc
 
duty = planetcnc.hw_output_duty(1)
print("Output pin 1 duty cycle:", duty)

See also