to be clear

provided it is wired correctly and the chip is pcf8574 the original code works just fine