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

    New library for 4Relay Unit

    Arduino
    2
    3
    4.7k
    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.
    • S
      sebkilou
      last edited by

      https://github.com/sfekilou/M5STACK_4RELAY

      Library with these functions:

      begin(TwoWire &wireport,int sdaPin, int sclPin,uint32_t frequency); //Initialize I2C port
      uint16_t ReadState(); //read 0x10 & 0x11 registers
      SyncMode(bool Sync); //sync or async LEDs
      void AllOff(); //set all relays to OFF
      void Write4Relay(int number,bool state); //set or unset the relay number

      1 Reply Last reply Reply Quote 2
      • m5stackM
        m5stack
        last edited by

        cool.

        1 Reply Last reply Reply Quote 0
        • S
          sebkilou
          last edited by sebkilou

          The library is now available on Platformio ("M5 Stack 4Relay Library") and Arduino IDE Library Manager.
          Can I use your 4-Relay picture to add in my Readme.md file on Github ? And/or add this link: https://shop.m5stack.com/collections/m5-unit/products/4-relay-unit ?
          If you want, you can add my Github link to your Arduino Example section.

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