Change pin mode pi4j v2.0 #76
-
How to change pin mode in v2.0 ? Im creating output pin like that :
And now I wanted to do :
Will it work? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I started a pull request for the Here is the original issue tracking this change: #26 However, I have not had the time to fully test it and get it merged into the project yet. Its something I cam probably start digging back into over the next couple of weeks. I think this would address the issue you have raised. You would create a single IO object and be able to call the |
Beta Was this translation helpful? Give feedback.
-
Yes, you can try to build from this branch That branch won't contain some of the newer changes, but should be good enough to test with. Thanks, Robert |
Beta Was this translation helpful? Give feedback.
-
rather old thread, but very interrested by the outcome: is this functionality (MultiPurposeDigitalInputOutput) available in Pi4J 2.2.1 and is there any doc or example about setting up a GPIO as dual purpose? Thank you! |
Beta Was this translation helpful? Give feedback.
@RudNick91
I started a pull request for the
MultiPurposeDigitalInputOutput
here: #30Here is the original issue tracking this change: #26
However, I have not had the time to fully test it and get it merged into the project yet. Its something I cam probably start digging back into over the next couple of weeks.
I think this would address the issue you have raised. You would create a single IO object and be able to call the
mode()
method to change to the desired INPUT or OUTPUT mode as needed.