<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[Solved] 5 RELAY Units on M5Stack device]]></title><description><![CDATA[<p dir="auto">Hi folks</p>
<p dir="auto">I have played around a bit with some relay units, but I cant find a way to connect 5 units to my M5Stack unit.</p>
<p dir="auto">I have tried:</p>
<ul>
<li>to connect them all to same port via splitters</li>
<li>to connect them all via Pa.HUB-Unit</li>
<li>to connect them all via Pb.HUB-Unit</li>
</ul>
<p dir="auto">It does not work.</p>
<p dir="auto">Does anyone have an idea or has everyone done it?</p>
<p dir="auto">Thanks very much<br />
Thomas</p>
]]></description><link>https://community.m5stack.com/topic/1781/solved-5-relay-units-on-m5stack-device</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 22:18:02 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1781.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 20 Mar 2020 13:27:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Solved] 5 RELAY Units on M5Stack device on Sat, 21 Mar 2020 13:39:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crami25" aria-label="Profile: crami25">@<bdi>crami25</bdi></a></p>
<p dir="auto">Thank you crami25</p>
<p dir="auto">I thought that I have to use the RELAY-Unit-Component and the PbHub.Unit-Component simultaneously in UIFlow.<br />
But as you told me, I just have to set the Outputs on the PbHub to 0 oder 1 :-)<br />
No need of the RELAY-Unit-Component in software.</p>
<pre><code>from m5stack import *
from m5ui import *
from uiflow import *
import unit

setScreenColor(0x222222)
pbhub0 = unit.get(unit.PBHUB, unit.PORTA)

while True:
  pbhub0.digitalWrite(0, 0, 1)
  wait_ms(100)
  pbhub0.digitalWrite(1, 0, 1)
  wait_ms(100)
  pbhub0.digitalWrite(2, 0, 1)
  wait_ms(100)
  pbhub0.digitalWrite(3, 0, 1)
  wait_ms(100)
  pbhub0.digitalWrite(4, 0, 1)
  wait(1)
  pbhub0.digitalWrite(0, 0, 0)
  wait_ms(100)
  pbhub0.digitalWrite(1, 0, 0)
  wait_ms(100)
  pbhub0.digitalWrite(2, 0, 0)
  wait_ms(100)
  pbhub0.digitalWrite(3, 0, 0)
  wait_ms(100)
  pbhub0.digitalWrite(4, 0, 0)
  wait(1)
</code></pre>
<p dir="auto">Great it works!</p>
<p dir="auto">Best regards Thomas</p>
]]></description><link>https://community.m5stack.com/post/7856</link><guid isPermaLink="true">https://community.m5stack.com/post/7856</guid><dc:creator><![CDATA[M5StickFreakler]]></dc:creator><pubDate>Sat, 21 Mar 2020 13:39:15 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved] 5 RELAY Units on M5Stack device on Sat, 21 Mar 2020 13:10:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/m5stickfreakler" aria-label="Profile: M5StickFreakler">@<bdi>M5StickFreakler</bdi></a></p>
<p dir="auto">You have to use the Pb-Hub unit, black connector of the relay units to the black connectors of the Pb-Hub (for analog and/or digital input/outputs, e.g. realys) . The Pa-Hub is used connecting i2c units (red connectors) with the same i2c address (e.g. to environment units).</p>
<p dir="auto">You can programm the 6 channels (analog or digital, equivalent to multiple Core-B channels) of the Pb-hub using blockly.</p>
<p dir="auto">good luck crami25</p>
]]></description><link>https://community.m5stack.com/post/7854</link><guid isPermaLink="true">https://community.m5stack.com/post/7854</guid><dc:creator><![CDATA[crami25]]></dc:creator><pubDate>Sat, 21 Mar 2020 13:10:56 GMT</pubDate></item></channel></rss>