6 Replies Latest reply on Aug 7, 2020 8:07 AM by JoBr_1593366

    How to access the value of a digital input terminal?

    JoBr_1593366

      I'm trying to edit an existing component to replace a hardware digital input pin with a digital input terminal, so I can control it from my schematic directly, rather than connecting it to a hardware GPIO. But how do I access the value of the terminal from inside the component? It doesn't have a read() function like a pin does? Do I need to connect it to a control register or something?  All it does is read a true or false value from the surrounding circuit.

       

      It would be simpler if I didn't need the terminal at all. Is there a way to have a component get a truth value from the containing schematic/program other than using a terminal?  Maybe the component exposes a function that lets the containing project modify it's internal state?  But the opposite would be better: if the component could query the containing project's state.