I'm not completely sure if it will really work as intended, but with the top switch the behaviour of the circuit can be changed. The switches in the lower left are the input, either High, low or open.
The voltmeter would be the input pin. Unfortunately it sometimes goes into the negative which might kill the microcontroller. Not sure if it's from the app or would happen in real, haven't tested the circuit.