Skip to content

how to use bidirectional pins on a custom component ? #680

Answered by hneemann
sami3232 asked this question in Q&A
Discussion options

You must be logged in to vote

You can build the component as if the output was only output.
Then when the setBidirectional() method is called on this output, another additional input is passed to the setInputs() method.
You can use the additional input to read the value and the output to set the value.
You just have to make sure to set the output to high-z if the pin is to be used as input.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sami3232
Comment options

Answer selected by sami3232
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants