2-relay vs 4-relay

  • Why is the program interface to the 2-relay and 4-relay modules different? Given that they do the same thing, having incompatible interfaces seems like a really bad idea.

  • M5Stack have messed up with their xRelay modules and units. They are all adressed by I2C, but all require different commands depending on the firmware they have used, So using the proposed uiflow blocks won't work, you have to use the I2C blocks (See my forum post for the 4-relay module).

    For the 2-relay module the documents tell you that the I2C-Address is 0x26 (as for the 4-Relay Module). In the uiflow demo they are talking about address 0x25 ?? writing to control register 0xFF you can probaly change the I2C address of the module.
    So you have to try out which commands work for you ...

  • The 2Relay is directly driven by the two GPIO's in the grove port.
    The 4Relay can not be driven in the same way as the grove port has only two GPIO wires and so a controller is needed to handle the multiple relays.

  • @ajb2k3 You are talking about the 2Relay-UNIT ... with the black (analog/digital) grove port !!
    The M5Stack MODULE 13.2 we are talking about ( https://shop.m5stack.com/products/2-relay-13-2-module) has a STM32F030 controller acting as an I2C interface controlling the 2 relais : The I2C address according to their documentation is 0x25 (mentioned in the features section) or 0x26 (according to their arduino or blockly section). The firmware is +/- the same as with the 4Relay module and the 4Relay Unit (https://shop.m5stack.com/products/4-relay-unit with the red I2C grove port, I2C address 0x26).

  • Ahh sorry, misread.