I figured out the reason, and it is not the code.
For some reason, PCF8575 can't drive ULN2803.
When I run it alone, outputs change as they should do
but when I connect output to ULN2803, output voltage of PCF8575 changes only from 0 to 0.6 volts and ULN2803 does not open.
Bookmarks