<?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[How to use two ENV units with PaHUB (UIFlow)]]></title><description><![CDATA[<p dir="auto">I am new to UIFlow and need your guidance.<br />
I managed to get temperature, humidity, and pressure for a single ENV unit directly connected to my M5Stack Fire (Port A) using the UIFlow.</p>
<p dir="auto">Next, I have a PaHub and two ENV units. I connect the first and the second ENV unit to the port 0 and port 1 of the PaHub. I checked and tried to understand the Pa.HUB UIFlow example provided by the github (Pa.HUB.m5f).  But still I could not understand how to proceed from the example to my goal, that is reading the two ENV units sequently. Please help!</p>
]]></description><link>https://community.m5stack.com/topic/1794/how-to-use-two-env-units-with-pahub-uiflow</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 23:57:07 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1794.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 26 Mar 2020 05:23:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to use two ENV units with PaHUB (UIFlow) on Sat, 18 Apr 2020 14:00:58 GMT]]></title><description><![CDATA[<pre><code>from m5stack import *
from m5ui import *
from uiflow import *
import hat
import unit
import hat

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

hat_pir0 = hat.get(hat.PIR)



label0 = M5TextBox(13, 8, "PIR Hat", lcd.FONT_Default,0xFFFFFF, rotate=0)
label1 = M5TextBox(12, 63, "PbHUB", lcd.FONT_Default,0xFFFFFF, rotate=0)
label2 = M5TextBox(34, 34, "0", lcd.FONT_Default,0xFFFFFF, rotate=0)
label3 = M5TextBox(0, 83, "+Light Unit", lcd.FONT_Default,0xFFFFFF, rotate=0)
label4 = M5TextBox(26, 109, "0", lcd.FONT_Default,0xFFFFFF, rotate=0)


while True:
  label2.setText(str(hat_pir0.state))
  label4.setText(str(pbhub0.analogRead(0)))
  wait(1)
  wait_ms(2)
</code></pre>
]]></description><link>https://community.m5stack.com/post/8214</link><guid isPermaLink="true">https://community.m5stack.com/post/8214</guid><dc:creator><![CDATA[liemph]]></dc:creator><pubDate>Sat, 18 Apr 2020 14:00:58 GMT</pubDate></item><item><title><![CDATA[Reply to How to use two ENV units with PaHUB (UIFlow) on Sat, 18 Apr 2020 14:00:08 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1587218405666-problem-resized.jpg" alt="0_1587218398396_problem.JPG" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/8213</link><guid isPermaLink="true">https://community.m5stack.com/post/8213</guid><dc:creator><![CDATA[liemph]]></dc:creator><pubDate>Sat, 18 Apr 2020 14:00:08 GMT</pubDate></item><item><title><![CDATA[Reply to How to use two ENV units with PaHUB (UIFlow) on Sat, 18 Apr 2020 13:57:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jollawat" aria-label="Profile: jollawat">@<bdi>jollawat</bdi></a> I do not have any ENV Hat, but I have a PIR Hat, and I tried to reconstruct your problem. I connected my PIR Hat and my PbHub (to Port A) of my Stick C. Then I connected my Light Unit to Port0 of my PbHub. Then I programmed using UiFlow to show the measurement results of both the PIR Hat and Light Unit. It worked well. Please see below, the code snapshot and list.</p>
]]></description><link>https://community.m5stack.com/post/8212</link><guid isPermaLink="true">https://community.m5stack.com/post/8212</guid><dc:creator><![CDATA[liemph]]></dc:creator><pubDate>Sat, 18 Apr 2020 13:57:39 GMT</pubDate></item><item><title><![CDATA[Reply to How to use two ENV units with PaHUB (UIFlow) on Sat, 18 Apr 2020 13:54:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jollawat" aria-label="Profile: jollawat">@<bdi>jollawat</bdi></a> I did not get it. Please post also your configuration (the connection between Stick-C, Hat and Unit) and your code.</p>
]]></description><link>https://community.m5stack.com/post/8211</link><guid isPermaLink="true">https://community.m5stack.com/post/8211</guid><dc:creator><![CDATA[liemph]]></dc:creator><pubDate>Sat, 18 Apr 2020 13:54:01 GMT</pubDate></item><item><title><![CDATA[Reply to How to use two ENV units with PaHUB (UIFlow) on Sat, 18 Apr 2020 04:47:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/liemph" aria-label="Profile: liemph">@<bdi>liemph</bdi></a> I tried connect and program by UIFlow it but there are some error after run on screen said “please remove ENV hat” when we add PbHUB into list.</p>
]]></description><link>https://community.m5stack.com/post/8210</link><guid isPermaLink="true">https://community.m5stack.com/post/8210</guid><dc:creator><![CDATA[jollawat]]></dc:creator><pubDate>Sat, 18 Apr 2020 04:47:02 GMT</pubDate></item><item><title><![CDATA[Reply to How to use two ENV units with PaHUB (UIFlow) on Sat, 18 Apr 2020 01:20:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jollawat" aria-label="Profile: jollawat">@<bdi>jollawat</bdi></a> There is no problem. The pins used for the Hat (ENV HAT) and the ones used for the grove port (PbHUB) are different.</p>
]]></description><link>https://community.m5stack.com/post/8203</link><guid isPermaLink="true">https://community.m5stack.com/post/8203</guid><dc:creator><![CDATA[liemph]]></dc:creator><pubDate>Sat, 18 Apr 2020 01:20:09 GMT</pubDate></item><item><title><![CDATA[Reply to How to use two ENV units with PaHUB (UIFlow) on Fri, 17 Apr 2020 17:30:36 GMT]]></title><description><![CDATA[<p dir="auto">Hi Guys<br />
I have some further question, what about M5Stick C + ENV HAT + PbHUB connect together?</p>
]]></description><link>https://community.m5stack.com/post/8194</link><guid isPermaLink="true">https://community.m5stack.com/post/8194</guid><dc:creator><![CDATA[jollawat]]></dc:creator><pubDate>Fri, 17 Apr 2020 17:30:36 GMT</pubDate></item><item><title><![CDATA[Reply to How to use two ENV units with PaHUB (UIFlow) on Fri, 10 Apr 2020 20:05:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/grafolabs" aria-label="Profile: grafolabs">@<bdi>grafolabs</bdi></a><br />
I think this is the video<br />
<a href="https://youtu.be/nMsCwqCE5c8" target="_blank" rel="noopener noreferrer nofollow ugc">https://youtu.be/nMsCwqCE5c8</a></p>
<p dir="auto">It is clear in explaining the PaHUB with UIFlow</p>
]]></description><link>https://community.m5stack.com/post/8101</link><guid isPermaLink="true">https://community.m5stack.com/post/8101</guid><dc:creator><![CDATA[Pepsi]]></dc:creator><pubDate>Fri, 10 Apr 2020 20:05:20 GMT</pubDate></item><item><title><![CDATA[Reply to How to use two ENV units with PaHUB (UIFlow) on Fri, 10 Apr 2020 18:26:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/liemph" aria-label="Profile: liemph">@<bdi>liemph</bdi></a> Could you share the link to the video, please?</p>
]]></description><link>https://community.m5stack.com/post/8099</link><guid isPermaLink="true">https://community.m5stack.com/post/8099</guid><dc:creator><![CDATA[GrafoLabs]]></dc:creator><pubDate>Fri, 10 Apr 2020 18:26:07 GMT</pubDate></item><item><title><![CDATA[Reply to How to use two ENV units with PaHUB (UIFlow) on Fri, 27 Mar 2020 02:34:12 GMT]]></title><description><![CDATA[<p dir="auto">Glad the video helped ;)</p>
]]></description><link>https://community.m5stack.com/post/7925</link><guid isPermaLink="true">https://community.m5stack.com/post/7925</guid><dc:creator><![CDATA[lukasmaximus]]></dc:creator><pubDate>Fri, 27 Mar 2020 02:34:12 GMT</pubDate></item><item><title><![CDATA[Reply to How to use two ENV units with PaHUB (UIFlow) on Thu, 26 Mar 2020 09:38:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/liemph" aria-label="Profile: liemph">@<bdi>liemph</bdi></a> Sorry, I have solved my problem by watching Lucas video on YouTube.</p>
]]></description><link>https://community.m5stack.com/post/7910</link><guid isPermaLink="true">https://community.m5stack.com/post/7910</guid><dc:creator><![CDATA[liemph]]></dc:creator><pubDate>Thu, 26 Mar 2020 09:38:57 GMT</pubDate></item></channel></rss>