<?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[Nesting of multiple PAhubs]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/2473/2x-pahub-mit-uiflow">2x PaHUB mit UIFlow</a><br />
I think this is related to a very old post, but there was no reply to it, so I opened a new topic:</p>
<p dir="auto">I wish to nest PAhubs (PAhub2) to expand the number of i2c sensor unit inputs beyond 6, by plugging in secondary PAhub(s) onto a primary PAhub.  From what I gather, the hardware is able to do this and several websites selling the hubs specifically mentions the example of connecting 6 PaHubs to a primary hub to support 36 sensor units.  It is also biefly mentioned in one of the official m5stack tutorial videos.</p>
<p dir="auto">But in UiFlow, how do I access  the sensor units that are connected to the secondary PAhub(s)?  It is easy to get addess assignment for the sensor units on the primary PAhub, but not for the secondary hubs.    Any suggestions?</p>
]]></description><link>https://community.m5stack.com/topic/6479/nesting-of-multiple-pahubs</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 23:03:31 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/6479.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 16 May 2024 09:35:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Nesting of multiple PAhubs on Sun, 19 May 2024 06:36:59 GMT]]></title><description><![CDATA[<p dir="auto">hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a><br />
Yes, thank you! Manual adding of the <em>Init pahub_0</em> block has solved this.</p>
]]></description><link>https://community.m5stack.com/post/25325</link><guid isPermaLink="true">https://community.m5stack.com/post/25325</guid><dc:creator><![CDATA[UP_BIM]]></dc:creator><pubDate>Sun, 19 May 2024 06:36:59 GMT</pubDate></item><item><title><![CDATA[Reply to Nesting of multiple PAhubs on Sat, 18 May 2024 19:46:50 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/up_bim" aria-label="Profile: UP_BIM">@<bdi>UP_BIM</bdi></a></p>
<p dir="auto">yes, I noticed that error too. Try adding an <code>Init pahub_0</code> block manually.</p>
<p dir="auto">See Project Zone example: <em>M5Tough_PaHub_Multiple_Units_UIFlow2.0.5</em></p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/25323</link><guid isPermaLink="true">https://community.m5stack.com/post/25323</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 18 May 2024 19:46:50 GMT</pubDate></item><item><title><![CDATA[Reply to Nesting of multiple PAhubs on Sat, 18 May 2024 15:32:31 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a><br />
Thank you for your advice.  With a Core 2, I get a "PAHUBUnit isn't defined"  error with this line of code:</p>
<p dir="auto"><em>env4_0 = ENVUnit(i2c=PAHUBUnit(i2c=i2c0, channel=0 , address=0x71), type=4)</em></p>
<p dir="auto">UIFlow2 also creates the same micropython line (just without the 0x71 address allocation), with the same error. In UiFlow 1 this is not a problem.</p>
<p dir="auto">I have not yet been able to attempt this with other M5 cores.  In your solution, which M5 core did you use?</p>
<p dir="auto">I am wondering if there is not a different call for Core 2's</p>
]]></description><link>https://community.m5stack.com/post/25321</link><guid isPermaLink="true">https://community.m5stack.com/post/25321</guid><dc:creator><![CDATA[UP_BIM]]></dc:creator><pubDate>Sat, 18 May 2024 15:32:31 GMT</pubDate></item><item><title><![CDATA[Reply to Nesting of multiple PAhubs on Sat, 18 May 2024 13:06:01 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/up_bim" aria-label="Profile: UP_BIM">@<bdi>UP_BIM</bdi></a></p>
<p dir="auto">it just occurred to me; except for the 7th ENV IV unit you could get away with only one PaHub like this:</p>
<pre><code>Core I2C Master --- PaHub
                     |
                    [0]- ENV IV - DLight - VMeter - CO2
                    [1]- ENV IV - DLight - VMeter - CO2
                    [2]- ENV IV - DLight - VMeter
                    [3]- ENV IV - DLight
                    [4]- ENV IV
                    [5]- ENV IV
</code></pre>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/25318</link><guid isPermaLink="true">https://community.m5stack.com/post/25318</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 18 May 2024 13:06:01 GMT</pubDate></item><item><title><![CDATA[Reply to Nesting of multiple PAhubs on Fri, 17 May 2024 09:49:15 GMT]]></title><description><![CDATA[<p dir="auto">Thanks <a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> (Felix)<br />
I think that will do the trick.   Much appreciated!</p>
]]></description><link>https://community.m5stack.com/post/25310</link><guid isPermaLink="true">https://community.m5stack.com/post/25310</guid><dc:creator><![CDATA[UP_BIM]]></dc:creator><pubDate>Fri, 17 May 2024 09:49:15 GMT</pubDate></item><item><title><![CDATA[Reply to Nesting of multiple PAhubs on Fri, 17 May 2024 08:21:29 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/up_bim" aria-label="Profile: UP_BIM">@<bdi>UP_BIM</bdi></a></p>
<p dir="auto">from the syntax I gather you are using UIFlow<strong>1</strong> (and not UIFlow<strong>2</strong>), correct?</p>
<p dir="auto">I already tried in the past to use a PaHub with non default I2C address in UIFlow<strong>1</strong>, but I wasn't successful. I don't think it is possible - but I could be wrong. In UIFlow<strong>2</strong> I found a solution. Please see <a href="https://community.m5stack.com/topic/3963/pahub-enviii-pressure-reading-issue/7">here</a>.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/25307</link><guid isPermaLink="true">https://community.m5stack.com/post/25307</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 17 May 2024 08:21:29 GMT</pubDate></item><item><title><![CDATA[Reply to Nesting of multiple PAhubs on Fri, 17 May 2024 07:02:28 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> (Felix)</p>
<p dir="auto">Measurements from several device types (ENV IV x 7 , CO2  x 2, Dlight x 4 , Voltmeter x3 etc ) are required.   The ENV sensors on their own will need more than one PaHUB:  so either a parallel, or nested approach is needed.</p>
<p dir="auto">Either way (parallel or nested), I am unable to correctly add the sensors  in UiFlow or in python. By default sensors are assigned to a PaHUB with address (0x70) via this python command (example an ENV 4 unit is added):</p>
<p dir="auto"><em>env4_0 = unit.get(unit.ENV4, unit.PAHUB0)</em>                 -----------    [1]</p>
<p dir="auto">"<em>unit.PAHUB0</em>" refers to channel 0 of the hub connected to port A that has an address of (0x70).</p>
<p dir="auto">To add other PaHubs is easy (in this case the hub's address was altered via hardwiring to 0x71):</p>
<p dir="auto"><em>pahub_0 = unit.get(unit.PAHUB, unit.PORTA, 0x71)</em> -----------    [2]</p>
<p dir="auto">But it is unclear how to add sensors to such a hub.    I am looking for the correct python syntax in line [1] to refer to a PaHUB that has an address other than (0x70).</p>
]]></description><link>https://community.m5stack.com/post/25306</link><guid isPermaLink="true">https://community.m5stack.com/post/25306</guid><dc:creator><![CDATA[UP_BIM]]></dc:creator><pubDate>Fri, 17 May 2024 07:02:28 GMT</pubDate></item><item><title><![CDATA[Reply to Nesting of multiple PAhubs on Thu, 16 May 2024 16:48:49 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/up_bim" aria-label="Profile: UP_BIM">@<bdi>UP_BIM</bdi></a></p>
<p dir="auto">ok, I see, thanks for posting the example.</p>
<p dir="auto">How many of the sensors have a unique I2C address? All of those can be connected directly to the core (i2c master) in paralell. Only the sensors which share the same i2c address need to go behind a PaHub (unless there is a way to change the i2c address of those sensors). For instance like this:</p>
<pre><code>Core I2C master ----|----------|----------|---~ ~----|
              PaHub(0x70)  S1(addr1)  S2(addr2)  S6(addr6)
                    |
                    | -- 1: S10 (addr10)
                    | -- 2: S10 (addr10)
                    ~
                    | -- 5: S10 (addr10)
                    | -- 6: S10 (addr10)
</code></pre>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/25298</link><guid isPermaLink="true">https://community.m5stack.com/post/25298</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 16 May 2024 16:48:49 GMT</pubDate></item><item><title><![CDATA[Reply to Nesting of multiple PAhubs on Thu, 16 May 2024 14:42:22 GMT]]></title><description><![CDATA[<p dir="auto">Thank you Felix</p>
<p dir="auto">Here is an example that mentions expansion to 36 I2C ports using 7 PAhubs:</p>
<p dir="auto"><a href="https://www.bastelgarage.ch/m5stack-pa-hub-2-i2c-expansion-unit-1-to-6" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.bastelgarage.ch/m5stack-pa-hub-2-i2c-expansion-unit-1-to-6</a></p>
<p dir="auto">"...For example, you can wire PaHUBs with the Root-PaHUB to get more places for your I2C slave devices. If you have seven of them, you can extend up to 36 I2C GROVE ports."</p>
<p dir="auto">So, I gather this is a nesting using two levels: 1 "Root PaHUB" (6x channels) and 6 secondary hubs (each with 6 channels).</p>
<p dir="auto">I anybody had success with this inside Uiflow or some other method, any advice will be appreciated.</p>
<p dir="auto">(I have the need to log data from about 15 sensors, some that are of the same type)</p>
]]></description><link>https://community.m5stack.com/post/25297</link><guid isPermaLink="true">https://community.m5stack.com/post/25297</guid><dc:creator><![CDATA[UP_BIM]]></dc:creator><pubDate>Thu, 16 May 2024 14:42:22 GMT</pubDate></item><item><title><![CDATA[Reply to Nesting of multiple PAhubs on Thu, 16 May 2024 11:15:32 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/up_bim" aria-label="Profile: UP_BIM">@<bdi>UP_BIM</bdi></a></p>
<p dir="auto">are you sure the examples you found are talking about nested PaHubs?</p>
<p dir="auto">Could it be that they mean connecting multiple PaHubs (with different I2C addresses) in parallel? E.g.</p>
<pre><code>Core I2C master ----------|------------|------------|------------|----~
                    PaHub(0x70)  PaHub(0x71)  PaHub(0x72)  PaHub(0x73)
</code></pre>
<p dir="auto">BTW: I don't think UIFlow supports nested PaHubs.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/25292</link><guid isPermaLink="true">https://community.m5stack.com/post/25292</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 16 May 2024 11:15:32 GMT</pubDate></item></channel></rss>