PbHUB CH4 and CH5 cannot set to digital read?

  • Today I try to connect OP180 via PbHUB that using CH4 and CH5 but cannot be detected, I tried to erase and re-burn firmware by using M5 Fire it's show CH4 and CH5 read value (disconnected all CH) is not over 1000 .
    I checked with schematics seems CH4 and CH5 input is only Analog.
    Kindly confirm me as well before I send this unit to RMA process.

  • Another problem:
    Digital read from port 4 and 5 (counting 0-5) is not possible for data line A. Return value is always '0'.
    Does anyone have a solution?

  • Hello @hazo

    that is not really surprising. CH4 and CH5 inputs are analog only. If you have a look at the schematic you'll see that IN4 and IN5 are connected to ADC (Analog Digital Converter) inputs of the ATMEGA328. In other words IN4 and IN5 are analog only and cannot be used as digital inputs.


  • @felmue Thanks for your reply. I found the table below on the official M5Stack (https://docs.m5stack.com/#/en/unit/pbhub?id=pinmap) and started from there. That's why I thought all ports had the same functionality ....