<?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[PaHUB + ENVIII pressure reading issue]]></title><description><![CDATA[<p dir="auto">Using an Atom Matrix with a PaHUB, a TVOC/eCO2 unit and an ENVIII gives a strange pressure result.<br />
The pressure value reads about 5 times the actual pressure level. This is the same whether the ENV is solo, or the other sensor is connected. Other readings seem to be working as expected,<br />
When the ENVIII is connected on its own the pressure readings are as expected.<br />
from m5stack import *<br />
from m5ui import *<br />
from uiflow import *<br />
import wifiCfg<br />
from m5mqtt import M5mqtt<br />
import time<br />
import unit</p>
<p dir="auto">rgb.set_screen([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xFFFFFF,0,0,0,0])<br />
tvoc_2 = unit.get(unit.TVOC, unit.PAHUB1)<br />
pahub_0 = unit.get(unit.PAHUB, unit.PORTA)<br />
env3_0 = unit.get(unit.ENV3, unit.PAHUB0)</p>
<p dir="auto">tempdata = None<br />
humdata = None<br />
pressdata = None<br />
iapbase = None<br />
tvoc = None<br />
basetvoc = None<br />
co2 = None<br />
baseco2 = None<br />
h2 = None<br />
eth = None</p>
<p dir="auto">wifiCfg.doConnect('<strong><strong>', '</strong></strong>')</p>
<p dir="auto">m5mqtt = M5mqtt('atomenv', '192.168.178.14', 1883, '', '', 600)<br />
m5mqtt.start()<br />
tvoc_2.set_iaq_baseline(35187, 35502)<br />
while True:<br />
tempdata = env3_0.temperature<br />
humdata = env3_0.humidity<br />
pressdata = env3_0.pressure<br />
m5mqtt.publish(str('temperature'),str(tempdata))<br />
m5mqtt.publish(str('humidity'),str(humdata))<br />
m5mqtt.publish(str('pressure'),str(pressdata))<br />
wait(2)<br />
iapbase = tvoc_2.get_iaq_baseline()<br />
tvoc = tvoc_2.TVOC<br />
basetvoc = tvoc_2.baseline_TVOC<br />
co2 = tvoc_2.eCO2<br />
baseco2 = tvoc_2.baseline_eCO2<br />
h2 = tvoc_2.H2<br />
eth = tvoc_2.Ethanol<br />
m5mqtt.publish(str('IAPbaseline'),str(iapbase))<br />
m5mqtt.publish(str('TVOCnow'),str(tvoc))<br />
m5mqtt.publish(str('TVOCbase'),str(basetvoc))<br />
m5mqtt.publish(str('CO2'),str(co2))<br />
m5mqtt.publish(str('CO2base'),str(baseco2))<br />
m5mqtt.publish(str('H2'),str(h2))<br />
m5mqtt.publish(str('ethanol'),str(eth))<br />
wait_ms(2)</p>
]]></description><link>https://community.m5stack.com/topic/3963/pahub-enviii-pressure-reading-issue</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Mar 2026 02:45:59 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3963.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Jan 2022 23:57:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to PaHUB + ENVIII pressure reading issue on Fri, 17 Nov 2023 12:45:06 GMT]]></title><description><![CDATA[<p dir="auto">Hello guys</p>
<p dir="auto">as stated before PaHUB and ENV III units cannot be used together as they share the same I2C address 0x70 by default. That said the I2C address of the PaHUB unit can be modified (let's say to use 0x71) to avoid the conflict.</p>
<p dir="auto">And in UIFlow<strong>2</strong> it is possible to use a PaHUB unit with modified I2C address. So in UIFlow<strong>2</strong> add an ENV III unit and select PAHUB as BUS (which automatically will add a PaHUB unit as well). Then replace the resulting <code>Init env3_0</code> block with an <code>Execute code</code> block with the following content:</p>
<p dir="auto">env3_0 = ENVUnit(i2c=PAHUB<strong>Unit</strong>(i2c=i2c0, channel=0, <strong>address=0x71</strong>), type=3)</p>
<p dir="auto">Note: ENV III unit is connected to the first channel of the PaHUB unit, e.g. channel 0.</p>
<p dir="auto">Complete Micropython code:</p>
<pre><code>import os, sys, io
import M5
from M5 import *
from hardware import *
import time
from unit import *

label0 = None
label1 = None
label2 = None
i2c0 = None
pahub_0 = None
env3_0 = None

def setup():
  global label0, label1, label2, i2c0, pahub_0, env3_0

  M5.begin()
  label0 = Widgets.Label("label0", 3, 4, 1.0, 0xffffff, 0x222222, Widgets.FONTS.DejaVu18)
  label1 = Widgets.Label("label1", 2, 22, 1.0, 0xffffff, 0x222222, Widgets.FONTS.DejaVu18)
  label2 = Widgets.Label("label2", 2, 44, 1.0, 0xffffff, 0x222222, Widgets.FONTS.DejaVu18)

  i2c0 = I2C(0, scl=Pin(1), sda=Pin(2), freq=100000)
  env3_0 = ENVUnit(i2c=PAHUBUnit(i2c=i2c0, channel=0 , address=0x71), type=3)

def loop():
  global label0, label1, label2, i2c0, pahub_0, env3_0
  M5.update()
  time.sleep(1)
  label0.setText(str(env3_0.read_temperature()))
  label1.setText(str(env3_0.read_pressure()))
  label2.setText(str(env3_0.read_humidity()))

if __name__ == '__main__':
  try:
    setup()
    while True:
      loop()
  except (Exception, KeyboardInterrupt) as e:
    try:
      from utility import print_error_msg
      print_error_msg(e)
    except ImportError:
      print("please update to latest firmware")
</code></pre>
<p dir="auto">BTW: In UIFlow<strong>1</strong> I have not been able to figure out how (if at all) it is possible to use a PaHUB unit with non default I2C address.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/22796</link><guid isPermaLink="true">https://community.m5stack.com/post/22796</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 17 Nov 2023 12:45:06 GMT</pubDate></item><item><title><![CDATA[Reply to PaHUB + ENVIII pressure reading issue on Sun, 12 Nov 2023 17:28:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/52013">@octopuss</a> I don't know but it may be a power issue. Mine is sat in a box waiting for me to connect it to the project</p>
]]></description><link>https://community.m5stack.com/post/22732</link><guid isPermaLink="true">https://community.m5stack.com/post/22732</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sun, 12 Nov 2023 17:28:38 GMT</pubDate></item><item><title><![CDATA[Reply to PaHUB + ENVIII pressure reading issue on Sun, 12 Nov 2023 15:38:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a> By the way , now we speaking about I2C do you know why Icannot use PaHub and Hat 8 servo in same time ? Is not the same I2C 0x38 vs 0x70 ? Its seem the first i initiate in script will be the only will work.</p>
]]></description><link>https://community.m5stack.com/post/22731</link><guid isPermaLink="true">https://community.m5stack.com/post/22731</guid><dc:creator><![CDATA[Octopuss]]></dc:creator><pubDate>Sun, 12 Nov 2023 15:38:27 GMT</pubDate></item><item><title><![CDATA[Reply to PaHUB + ENVIII pressure reading issue on Sat, 11 Nov 2023 19:46:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/52013">@octopuss</a> you are correct.<br />
Because the ENVIII has the same I2C address, you are getting corruption from the hub</p>
]]></description><link>https://community.m5stack.com/post/22725</link><guid isPermaLink="true">https://community.m5stack.com/post/22725</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 11 Nov 2023 19:46:03 GMT</pubDate></item><item><title><![CDATA[Reply to PaHUB + ENVIII pressure reading issue on Fri, 10 Nov 2023 19:36:14 GMT]]></title><description><![CDATA[<p dir="auto">Hello,<br />
Maybe its because PaHUB and sensor QMP6988 have same I2C adresse 0x70.<br />
Possibly modify PaHUB adresse to 71 by soldering on the component.</p>
]]></description><link>https://community.m5stack.com/post/22719</link><guid isPermaLink="true">https://community.m5stack.com/post/22719</guid><dc:creator><![CDATA[Octopuss]]></dc:creator><pubDate>Fri, 10 Nov 2023 19:36:14 GMT</pubDate></item><item><title><![CDATA[Reply to PaHUB + ENVIII pressure reading issue on Tue, 27 Dec 2022 16:59:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/14125">@boomvalt</a> I have the same issue.  The ENV III Unit works well when connected directly to Port A, it displays the temperature, humidity, and pressure correctly, but when I connect the sensor to PaHub, the temperature and humidity have still correct values, but the pressure is static and shows a negative number something like -513233.2.   I have two units and with both, I have the same results.</p>
<p dir="auto">Were you able to solve this issue?</p>
<p dir="auto">Regards.</p>
<p dir="auto">Alvaro B</p>
]]></description><link>https://community.m5stack.com/post/19668</link><guid isPermaLink="true">https://community.m5stack.com/post/19668</guid><dc:creator><![CDATA[alvaroskinoski]]></dc:creator><pubDate>Tue, 27 Dec 2022 16:59:27 GMT</pubDate></item></channel></rss>