<?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[Not possible to connect Pa.HUB on M5Stack CORE2]]></title><description><![CDATA[<p dir="auto">Hello together<br />
I have a problem to connect the Pa.HUB to my CORE2</p>
<p dir="auto">I try to do a weatherstation, were I have to read from different sensor's<br />
I have to use "ENVII", "EXT.I/O" and "ADC" sensors. I try to use the Pa.HUB as connector.<br />
The Pa.HUB is connectet to the PortA (Red)<br />
Always when I try to uploade the programm, there is the fail: "name 'freq' isn't defined"</p>
<p dir="auto">When I connect the ENVII directly to PortA, since V1.7.2 it works. But i need to read more sensors.</p>
<p dir="auto">I use the M5 CORE2, with PaHUB<br />
I use the V1.7.2 on my M5 and did burn them with M5Burner.<br />
I use the V1.7.2  UiFLOW Beta (The other version do not support the M5 Core2)<br />
The sending/uploding from the progrogrammcode to the M5 over the Internet work's well with other codes, the country is switzerland.</p>
<p dir="auto">codeexample:<br />
~~<br />
from m5stack import *<br />
from m5stack_ui import *<br />
from uiflow import *<br />
import time<br />
import unit</p>
<p dir="auto">screen = M5Screen()<br />
screen.clean_screen()<br />
screen.set_screen_bg_color(0xFFFFFF)<br />
pahub1 = unit.get(unit.PAHUB, unit.PORTA)<br />
env21 = unit.get(unit.ENV2, unit.PAHUB0)<br />
ext_io1 = unit.get(unit.EXT_IO, unit.PAHUB1)<br />
adc0 = unit.get(unit.ADC, unit.PAHUB2)</p>
<p dir="auto">text_header = M5Label('Wetterstation Transferprojekt', x=15, y=10, color=0x000, font=FONT_MONT_26, parent=None)<br />
text2_humi = M5Label('Luftfeuchtigkeit:', x=15, y=75, color=0x000, font=FONT_MONT_18, parent=None)<br />
text1_temp = M5Label('Temparatur:', x=15, y=50, color=0x000, font=FONT_MONT_18, parent=None)<br />
text3_pres = M5Label('Luftdruck:', x=15, y=100, color=0x000, font=FONT_MONT_18, parent=None)<br />
text3_windspeed = M5Label('Windgeschwindigkeit:', x=15, y=125, color=0x000, font=FONT_MONT_18, parent=None)<br />
text5_winddir = M5Label('Windrichtung:', x=15, y=150, color=0x000, font=FONT_MONT_18, parent=None)<br />
text6_rain = M5Label('Regen:', x=15, y=175, color=0x000, font=FONT_MONT_18, parent=None)<br />
val_temp = M5Label('N/A', x=200, y=50, color=0x000, font=FONT_MONT_18, parent=None)<br />
val_humi = M5Label('N/A', x=200, y=75, color=0x000, font=FONT_MONT_18, parent=None)<br />
val_pres = M5Label('N/A', x=200, y=100, color=0x000, font=FONT_MONT_18, parent=None)<br />
val_windspeed = M5Label('N/A', x=200, y=125, color=0x000, font=FONT_MONT_18, parent=None)<br />
val_winddir = M5Label('N/A', x=200, y=150, color=0x000, font=FONT_MONT_18, parent=None)<br />
val_rain = M5Label('N/A', x=200, y=175, color=0x000, font=FONT_MONT_18, parent=None)</p>
<p dir="auto">while True:<br />
val_temp.set_text(str(env21.temperature))<br />
val_humi.set_text(str(env21.humidity))<br />
val_pres.set_text(str(env21.pressure))<br />
val_windspeed.set_text(str(ext_io1.digitRead(0)))<br />
val_winddir.set_text(str(adc0.voltage))<br />
wait(2)<br />
wait_ms(2)~~</p>
<p dir="auto">Error Detail<br />
~~<br />
File "&lt;string&gt;", line 11, in &lt;module&gt;<br />
File "<a href="http://unit.py" target="_blank" rel="noopener noreferrer nofollow ugc">unit.py</a>", line 130, in get<br />
File "&lt;string&gt;", line 1, in &lt;module&gt;<br />
File "&lt;units/_env2.py&gt;", line 7, in <strong>init</strong><br />
File "&lt;i2c_bus.py", line 183, in <strong>init</strong><br />
File "&lt;i2c_bus.py", line 40, in <strong>init</strong><br />
File "&lt;i2c_bus.py", line 32, in get<br />
File "&lt;i2c_bus.py", line 130, in <strong>init</strong><br />
NameError: name 'freq' isn't defined<br />
~~</p>
<p dir="auto">Hope for a solution<br />
Thx Matthias</p>
]]></description><link>https://community.m5stack.com/topic/2852/not-possible-to-connect-pa-hub-on-m5stack-core2</link><generator>RSS for Node</generator><lastBuildDate>Tue, 10 Mar 2026 18:12:30 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2852.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 28 Jan 2021 21:21:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Not possible to connect Pa.HUB on M5Stack CORE2 on Fri, 19 Feb 2021 16:00:53 GMT]]></title><description><![CDATA[<p dir="auto">Hello again</p>
<p dir="auto">I found that when I switch M5Core2 firmware back to 1.7.1.1 and use it with UIFlow 1.7.2 (online) the error goes away and PaHUB works as expected.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/12569</link><guid isPermaLink="true">https://community.m5stack.com/post/12569</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 19 Feb 2021 16:00:53 GMT</pubDate></item><item><title><![CDATA[Reply to Not possible to connect Pa.HUB on M5Stack CORE2 on Thu, 18 Feb 2021 14:08:56 GMT]]></title><description><![CDATA[<p dir="auto">Hi guys</p>
<p dir="auto">not ideal at all but here is a possible work-a-round until this stupid issue has been resolved.</p>
<p dir="auto">The trick is to <strong>not</strong> add the units connected to PaHUB in UiFlow but to initialise them later when PaHUB has selected the respective channel / unit.<br />
In my example the AMeter is connected to PaHUB output 0. Also variable <code>current</code> needs to be defined from within UiFlow.</p>
<p dir="auto"><img src="/assets/uploads/files/1613657086173-m5core2_pahub_ameter_20210218.png" alt="0_1613657081831_M5Core2_PaHub_AMeter_20210218.png" class=" img-fluid img-markdown" /></p>
<pre><code>from m5stack import *
from m5stack_ui import *
from uiflow import *
import unit

screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
pahub0 = unit.get(unit.PAHUB, unit.PORTA)

current = None

label0 = M5Label('Text', x=30, y=43, color=0x000, font=FONT_MONT_24, parent=None)

pahub0.select_only_on(0)
myAMeter = unit.get(unit.AMETER, (32, 33))
current = str(myAMeter.current())
label0.set_text(str(current))
</code></pre>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/12549</link><guid isPermaLink="true">https://community.m5stack.com/post/12549</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 18 Feb 2021 14:08:56 GMT</pubDate></item><item><title><![CDATA[Reply to Not possible to connect Pa.HUB on M5Stack CORE2 on Wed, 10 Feb 2021 17:41:03 GMT]]></title><description><![CDATA[<p dir="auto">I have the same problem with the <em>PaHub</em> and two <em>ToF</em> sensors.<br />
Firmware Used: <code>v1.7.2-core2</code></p>
<p dir="auto">Simple code to reproduce below. And Screenshot for graphical representation.</p>
<pre><code class="language-Python">from m5stack import *
from m5stack_ui import *
from uiflow import *
import unit

screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
pahub0 = unit.get(unit.PAHUB, unit.PORTA)
tof0 = unit.get(unit.TOF, unit.PAHUB0)
tof1 = unit.get(unit.TOF, unit.PAHUB1)

label0 = M5Label('Text', x=21, y=13, color=0x000, font=FONT_MONT_46, parent=None)
label1 = M5Label('Text', x=21, y=71, color=0x000, font=FONT_MONT_46, parent=None)


while True:
  label0.set_text(str(tof0.distance))
  label1.set_text(str(tof1.distance))
  wait_ms(2)
</code></pre>
<p dir="auto"><img src="/assets/uploads/files/1612978558108-screenshot-resized.png" alt="0_1612978556386_screenshot.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/12418</link><guid isPermaLink="true">https://community.m5stack.com/post/12418</guid><dc:creator><![CDATA[nicenemo]]></dc:creator><pubDate>Wed, 10 Feb 2021 17:41:03 GMT</pubDate></item><item><title><![CDATA[Reply to Not possible to connect Pa.HUB on M5Stack CORE2 on Sat, 06 Feb 2021 09:29:11 GMT]]></title><description><![CDATA[<p dir="auto">The error should not be connected to where the device is conneced.<br />
<code>NameError: name 'freq' isn't defined</code><br />
is a result of micropython not loading a library.<br />
if it was not found the error should be<br />
<code>Device not found, check connection</code></p>
<p dir="auto">I see That you are using the Core2 so its possible that 'freq' is called something else and you have found another bug in UIFlow</p>
]]></description><link>https://community.m5stack.com/post/12339</link><guid isPermaLink="true">https://community.m5stack.com/post/12339</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 06 Feb 2021 09:29:11 GMT</pubDate></item><item><title><![CDATA[Reply to Not possible to connect Pa.HUB on M5Stack CORE2 on Fri, 05 Feb 2021 18:33:22 GMT]]></title><description><![CDATA[<p dir="auto">I have exactly the same error message with my CORE2 connected to a PaHub and an ADC module.<br />
The ADC module works perfectly directly connected to port A of CORE2, but not through the PaHub<img src="/assets/uploads/files/1612549988307-p1110066.jpg" alt="1_1612549860714_P1110066.JPG" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1612549988260-p1110067.jpg" alt="0_1612549860714_P1110067.JPG" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/12325</link><guid isPermaLink="true">https://community.m5stack.com/post/12325</guid><dc:creator><![CDATA[Arno]]></dc:creator><pubDate>Fri, 05 Feb 2021 18:33:22 GMT</pubDate></item></channel></rss>