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

    ENV+Relay

    Units
    2
    4
    7.6k
    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.
    • K
      Kris
      last edited by

      Why are ENV and Relay not working on the same port A?

      1 Reply Last reply Reply Quote 0
      • liemphL
        liemph
        last edited by

        @Kris The ENV unit uses I2C interface while the Relay unit uses a single bus (simple digital i/o) interface. For example, if you use M5Stack Fire, as default, the ENV unit is connected to Port A (I2C) and the Relay unit to Porb B (I/O). For some reason, if you really need to use Port A for your Relay unit, of course, you can. But you have to carefully program the correct pin of Port A to work as an output port to control the relay. To be more precise, the pin for SDA of (I2C) (yellow color) of Port A should be programmed to be an output pin (corresponding to the REL pin of your Relay unit). For this particular case, the fourth pin (SCL, white color) of the Port A is not used. The same grove cable can be used for both units. Good luck.

        1 Reply Last reply Reply Quote 1
        • liemphL
          liemph
          last edited by

          Check the pin layout of the two units:

          0_1600688353034_IMG_20200921_203452.jpg

          1 Reply Last reply Reply Quote 0
          • K
            Kris
            last edited by

            I see.

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