Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Question - change pinMode of GpioPinDigitalMultipurpose #547

Open
supertick opened this issue Dec 26, 2021 · 1 comment
Open

Question - change pinMode of GpioPinDigitalMultipurpose #547

supertick opened this issue Dec 26, 2021 · 1 comment

Comments

@supertick
Copy link

Hello,
Thanks for the great project.
I currently initialize all pins to PinMode.INPUT - but would dynamically light to change the mode depending on need to PinMode.OUTPUT.

I get
com.pi4j.io.gpio.exception.InvalidPinModeException: Invalid pin mode on pin [GPIO 13]; cannot setState() when pin mode is [input]

Is there a way to do this? By perhaps deprovisioning and re-provisioning ?

Thanks kindly.

@FDelporte
Copy link
Member

This has been discussed in the V2-project with a reference to an implementation in V1:
Pi4J/pi4j-v2#26

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants