Hi All, Is there a way to change GPIO settings on conditions? To get my FSR strip working I need to read pressure first, which needs certain configuration. To then read position I need to switch some pins from digital out (low to clear capactive voltages) then back to analog to read the data.
This is best done by making a custom object for the FSR strip, that takes care of toggling the gpio settings and latching the analog readout. Do you have a link to a datasheet or something that documents the requirements?
Oh, this comment is a leftover from early days when boolean wires did not exist yet.
The output mode is either "Push pull" or "open drain".
In push-pull mode, setting the output to high/true means it acts as a 3.3V voltage source, setting the output to low/false means it acts as a 0V voltage source. This is the usual mode.
In open-drain mode, setting the output to high/true means it is a floating output, the actual voltage on the output depends on external circuitry on the GPIO pad. Setting the output to low/false means it acts as a 0V voltage source. This can be used to create a 5V logic output, by connecting a resistor between the GPIO pad and +5V. Or some communication protocols use this, the most common example is I2C.