When reading a pin, such as P0, from the I2C PCF8574 IO expansion board, it seems to read HIGH, unless I pull it low. Can you explain what I’m seeing?
At power on, all the ports are HIGH with a weak 100uA internal pull-up to Vdd. More information can be found at https://www.nxp.com/docs/en/data-sheet/PCF8574_PCF8574A.pdf.
Regarding the I/O expansion board, its I/O pins are “quasi-bidirectional”. That means that instead of setting the pin to either an input or an output (by calling pinMode in Arduino), you just go ahead and read or write them. To set a pin that you previously have written (i.e. made it output something) back to an input, write a 1 to that pin and then an external device can pull that pin high or low. Details on the datasheet at https://www.waveshare.com/wiki/PCF8574_IO_Expansion_Board.
The library to use is at https://github.com/xreef/PCF8574_library.