<?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[PbHub + 2-Relay Units - only 1 relay channel working?]]></title><description><![CDATA[<p dir="auto">Hi - I have a PbHub with a 2-relay unit connected to (if it matters) CH5.  The 2-relay unit works fine when connected directly to the Core 2 device/Port C, but when connected to the PbHub, only 1 or the two relays will switch.</p>
<p dir="auto">I'm using micropython and:</p>
<p dir="auto">pbhub_0.digitalWrite(5, 0, 0)<br />
pbhub_0.digitalWrite(5, 0, 1)</p>
<p dir="auto">-- <strong>works</strong> (off/on)</p>
<p dir="auto">pbhub_0.digitalWrite(5, 1, 0)<br />
pbhub_0.digitalWrite(5, 1, 1)</p>
<p dir="auto">-- <strong>doesn't do anything</strong></p>
<p dir="auto">the 2-relay unit (confusingly) has labeled channels of 1 and 2 on the device, A and B on the schematic - and takes 1 and 2 as relay identifiers if you're controlling it directly (via Port A) the UI flow code/micropython is:</p>
<p dir="auto">relay2_0.set_value(1, 0)<br />
relay2_0.set_value(1,1)<br />
relay2_0.set_value(2,0)<br />
relay2_0.set_value(2,1)</p>
<p dir="auto">I'm considering addressing the PbHub directly or trying arduino code, but just wondering if there's some obvious reason I'm missing.</p>
<p dir="auto">-Thanks!</p>
]]></description><link>https://community.m5stack.com/topic/5618/pbhub-2-relay-units-only-1-relay-channel-working</link><generator>RSS for Node</generator><lastBuildDate>Wed, 06 May 2026 01:28:24 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5618.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 30 Aug 2023 22:41:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to PbHub + 2-Relay Units - only 1 relay channel working? on Thu, 31 Aug 2023 19:50:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> SOLVED - thanks for that - CH2 works as expected!</p>
]]></description><link>https://community.m5stack.com/post/22112</link><guid isPermaLink="true">https://community.m5stack.com/post/22112</guid><dc:creator><![CDATA[emsea22]]></dc:creator><pubDate>Thu, 31 Aug 2023 19:50:40 GMT</pubDate></item><item><title><![CDATA[Reply to PbHub + 2-Relay Units - only 1 relay channel working? on Thu, 31 Aug 2023 10:14:34 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/emsea22" aria-label="Profile: emsea22">@<bdi>emsea22</bdi></a></p>
<p dir="auto">which version PbHub are you using? v1.0 <a href="https://docs.m5stack.com/en/unit/pbhub" target="_blank" rel="noopener noreferrer nofollow ugc">U041</a> or v1.1 <a href="https://docs.m5stack.com/en/unit/pbhub_1.1" target="_blank" rel="noopener noreferrer nofollow ugc">U041-B</a>?</p>
<p dir="auto">I think only version v1.1 can both pins have set to outputs on all channels. The original PbHub has its IN pins for CH4 and CH5 connected to ADC inputs of the Mega328 which I guess means they can only be inputs.</p>
<p dir="auto">Have you tried a different channel, e.g. CH0?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/22108</link><guid isPermaLink="true">https://community.m5stack.com/post/22108</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 31 Aug 2023 10:14:34 GMT</pubDate></item></channel></rss>