Thanks for the library
I noticed that when I was reading on some pins and writing on others that the write operation impacts the pins I want to read values from. Looks like to do reads, the pins need to have been set high (The default state of the pcf8575). However if I do a pin write i.e. pin(4,1) , then the other pins get set low (0) and I can no longer read values from them. I don't mind making a change to the logic to support doing reads and writes on the same pcf8575 device but not sure the best way to approach it .
- One choice is to read the values of all the pins and set the one other than the pin I am writing to , to the same value.
- Another option would be to define a mask of read pins and always set then high when doing a write .
Thanks for the library
I noticed that when I was reading on some pins and writing on others that the write operation impacts the pins I want to read values from. Looks like to do reads, the pins need to have been set high (The default state of the pcf8575). However if I do a pin write i.e. pin(4,1) , then the other pins get set low (0) and I can no longer read values from them. I don't mind making a change to the logic to support doing reads and writes on the same pcf8575 device but not sure the best way to approach it .