I’m trying to figure out how I can toggle an output port’s state without knowing what the state is prior to the toggle. For instance, I have a method that will run, instantiate an OutputPort and then I want to toggle the output pins value. But, there’s no way to know what state it’s currently in.
Is this possible? Will I need to instead create a global variable to hold all of my pin states, read the variable, and then toggle the outputport appropriately?