Returns state of output port or individual pin on that port.
First pin has index 1.
When index is omitted or set to -1, returns the complete output value.
planetcnc.hw_output() planetcnc.hw_output(index)
#! /usr/bin/env python import planetcnc # Get the complete output port state full_output = planetcnc.hw_output() print("Full Output:", full_output) # Get the state of the first pin pin1_state = planetcnc.hw_output(1) print("Pin 1 state:", pin1_state)