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 :)
And here is the blockly diagram of a full 4-Relay control with a Core 2, using four touch switches for individual relay control:
-
Thank you for sharing this.
-
Thanks for the great information.
And I have a question.
Is the block in the second half of the last figure a block for 4-Relay Unit?
My UIFlow (ver.1.7.3) doesn't have a 4-Relay Unit icon, so I can't select it. -
@rokuemon said in 4-Relay Unit control with UiFlow:
Thanks for the great information.
And I have a question.
Is the block in the second half of the last figure a block for 4-Relay Unit?
My UIFlow (ver.1.7.3) doesn't have a 4-Relay Unit icon, so I can't select it.@rokuemon said in 4-Relay Unit control with UiFlow:
Thanks for the great information.
And I have a question.
Is the block in the second half of the last figure a block for 4-Relay Unit?
My UIFlow (ver.1.7.3) doesn't have a 4-Relay Unit icon, so I can't select it.The relay_control blocks are variables that you create and name.
-
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. -
@lgx
Thank you for your reply.
From your information, I knew that it was a Core 2 feature.
I want to use 4-Relay with my M5stickC.
I will continue to study UIflow. -
This post is deleted! -