hw_aux()

Returns the state of the auxiliary port for the specified pin.

The pin index starts from 1 up to the maximum defined by the controller.

Syntax

planetcnc.hw_aux(index)

Parameters

Parameter Type Description Comment
index int Pin index (starting from 1). Must be within valid range.

Return Value

Examples

#! /usr/bin/env python
 
import planetcnc
 
# Get the state of aux port pin 1
aux_state = planetcnc.hw_aux(1)
print("Aux port pin 1 state:", aux_state)

See also