pin write sets other pins to zero/low
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 .
I'm running into the same issue here. Did you develop a fix or workaround? Thanks
My main work around was to set the pin value high before reading it. In the end I didn't need to write out data for my project so didn't fix it.