I am trying to create something which uses Charlieplexing, and to use it, I need to be able to turn GPIO Pins to and from different states (Low, High and Input) from what I understand from this video: http://www.youtube.com/watch?v=ECXk95qYZu8.
To make a pin low (according to this), I would do:
final GpioController gpio = GpioFactory.getInstance(); GpioPinDigitalOutput myLed = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_04,PinState.LOW);
myLed.low(); and likewise with High.
The problem is I don't think I can change the Pin's state to "Input". This says that I would have needed to create the variable as an
GpioPinDigitalInput, not an
Does anyone know how I can change a pin's state from High or Low to Input and vica-versa? Will "re-declaring" the variable work?