Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. LGx
    3. Posts
    • Continue chat with LGx
    • Start new chat with LGx
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by LGx

    • RE: 4-Relay Unit control with UiFlow

      @rokuemon

      Hi!

      No, the blocks you are speaking of (the blue ones with switch0, switch1...) are
      the Core 2's touch switches. You can access them in the UI menu after you put them on screen.
      I put 4 of them on screen, to individually control the 4-Relay.
      The 4-Relay Unit is not represented in UiFlow units, you can not select it.

      0_1616010831313_rel.JPG

      posted in Modules
      LGx
    • 4-Relay Unit control with UiFlow

      Hi guys!

      I have played a bit with my 4-Relay Unit in UiFlow, and want to share the result for those who want to program it with blockly.

      You can control it with I2C at address 0x26
      The relay control data reg is 0x11 (decimal 17) and the data is the binary state (1-open, 0-closed) of the relays in decimal number.
      If you want to open relay 3, that should be 0100 in binary which is 4 in decimal, so you have to control the relay with the number "4".

      I made a small diagram, I hope it is clear how to use it :)

      0_1615577235686_4relay_control_uiflow.jpg

      And here is the blockly diagram of a full 4-Relay control with a Core 2, using four touch switches for individual relay control:

      0_1615577381495_blockly.JPG

      posted in Modules
      LGx