Maybe my question is very silly

Home Forums The libraries hosted on the site PCF8574 i2c digital I/O expander Maybe my question is very silly

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #21441
      Cristian
      Participant

        Hello, my question is that I only want to read some sensors connected to the pcf8574at pins, it is not clear to me what mode I should use for this purpose, I read everything as 1 byte or I should read them separately as
        uint8_t val = pcf8574.digitalRead(P1);
        uint8_t val = pcf8574.digitalRead(P2);
        uint8_t val = pcf8574.digitalRead(P3);
        ….etc

      • #21442
        Renzo Mischianti
        Keymaster

          Hi Cristian,
          you can use read all or read single pin, but I discourage using a mixed-mode because I use a “debounce” and It can be not so simple to understand.
          Bye Renzo

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.
      Exit mobile version