i2c port expander PCF8574 as input

@ Yot:
I assume if(count = 1) {
in the code above is a typo?