🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    PbHUB CH4 and CH5 cannot set to digital read?

    Units
    3
    4
    6.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jollawat
      last edited by

      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.
      0_1586698512511_IMG_1985.JPG
      0_1586698638703_SCH.JPG

      1 Reply Last reply Reply Quote 0
      • H
        hazo
        last edited by

        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?

        1 Reply Last reply Reply Quote 0
        • felmueF
          felmue
          last edited by

          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.

          Thanks
          Felix

          GPIO translation table M5Stack / M5Core2
          Information about various M5Stack products.
          Code examples

          H 1 Reply Last reply Reply Quote 1
          • H
            hazo @felmue
            last edited by

            @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 ....

            0_1617097247162_4ac4b932-044b-4d40-ac0b-9f82a9bf5dee-afbeelding.png

            1 Reply Last reply Reply Quote 0
            • First post
              Last post