<?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[Issue with Env-iii hat.]]></title><description><![CDATA[<p dir="auto">Having an issue running the following code with the env-iii hat. Any help would be appreciated.</p>
<pre><code>#include &lt;M5StickCPlus.h&gt;
#include "M5_ENV.h"

SHT3X sht30;
QMP6988 qmp6988;

float tmp = 0.0;
float hum = 0.0;
float pressure = 0.0;
int status;

void setup() {
  M5.begin();
  //M5.Axp.ScreenBreath(8);
  M5.Lcd.setRotation(3);
  Wire.begin(0,26);
  qmp6988.init();
}

void loop() {
  pressure = qmp6988.calcPressure();

  status = sht30.get();

  tmp = sht30.cTemp;
  hum = sht30.humidity;

  M5.Lcd.fillScreen(BLACK);
  M5.Lcd.setCursor(0, 0);
  M5.Lcd.printf("Temp: %2.1f\r\nHumi: %2.0f%%\r\nPressure:%2.0fPa\r\nStatus: %d", tmp, hum, pressure, status);
  delay(4000);
}
</code></pre>
<p dir="auto">04:49:47.756 -&gt; [     2][I][esp32-hal-i2c.c:75] i2cIni��): Initialising I2C Master: sda=32 scl=33 freq=100000<br />
04:49:47.756 -&gt; [     5][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz<br />
04:49:47.796 -&gt; M5StickCPlus initializing...[    78][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=21 scl=22 freq=100000<br />
04:49:48.391 -&gt; OK<br />
04:49:48.391 -&gt; E (645) ledc: freq_hz=0 duty_resolution=13<br />
04:49:48.391 -&gt; [   649][E][esp32-hal-ledc.c:75] ledcSetup(): ledc setup failed!<br />
04:49:48.391 -&gt; [   649][W][Wire.cpp:301] begin(): Bus already started in Master Mode.<br />
04:49:48.391 -&gt; [   653][W][Wire.cpp:301] begin(): Bus already started in Master Mode.<br />
04:49:49.506 -&gt; [  1760][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263<br />
04:49:50.512 -&gt; [  2761][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263</p>
]]></description><link>https://community.m5stack.com/topic/4900/issue-with-env-iii-hat</link><generator>RSS for Node</generator><lastBuildDate>Mon, 11 May 2026 18:33:56 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4900.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Dec 2022 04:56:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Issue with Env-iii hat. on Fri, 16 Dec 2022 15:49:28 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/goochiecobbler" aria-label="Profile: goochiecobbler">@<bdi>goochiecobbler</bdi></a></p>
<p dir="auto">I am happy to hear it worked. And thank you for reporting back and posting the working code.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/19574</link><guid isPermaLink="true">https://community.m5stack.com/post/19574</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 16 Dec 2022 15:49:28 GMT</pubDate></item><item><title><![CDATA[Reply to Issue with Env-iii hat. on Fri, 16 Dec 2022 14:11:11 GMT]]></title><description><![CDATA[<p dir="auto">That did fix it, thank you so much. &lt;3<br />
I did notice that error, just still familiarizing myself with arduino and wasn't sure how to go about it.</p>
<p dir="auto">Working code follows for anyone wondering.</p>
<pre><code>#include &lt;M5StickCPlus.h&gt;
#include "M5_ENV.h"

SHT3X sht30;
QMP6988 qmp6988;

float tmp = 0.0;
float hum = 0.0;
float pressure = 0.0;

void setup() {
  M5.begin();
  M5.Lcd.setRotation(3);
  Wire.end();
  Wire.begin(0,26);
  qmp6988.init();
}

void loop() {
  pressure = qmp6988.calcPressure();

  sht30.get();

  tmp = sht30.cTemp;
  hum = sht30.humidity;

  M5.Lcd.fillScreen(BLACK);
  M5.Lcd.setCursor(0, 0);
  M5.Lcd.printf("Temp: %2.1f\r\nHumi: %2.0f%%\r\nPressure:%2.0fPa\r\n", tmp, hum, pressure);
  delay(1000);
}
</code></pre>
]]></description><link>https://community.m5stack.com/post/19570</link><guid isPermaLink="true">https://community.m5stack.com/post/19570</guid><dc:creator><![CDATA[goochiecobbler]]></dc:creator><pubDate>Fri, 16 Dec 2022 14:11:11 GMT</pubDate></item><item><title><![CDATA[Reply to Issue with Env-iii hat. on Fri, 16 Dec 2022 08:49:44 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/goochiecobbler" aria-label="Profile: goochiecobbler">@<bdi>goochiecobbler</bdi></a></p>
<p dir="auto">not sure, what is going wrong. But the Arduino Wire library has changed in the past and has broken some previously working examples.</p>
<p dir="auto">There is a hint in the log about 'Bus already started in Master Mode' so you could try adding a <code>Wire.end();</code> before the <code>Wire.begin(0, 26);</code> and see if that helps.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/19569</link><guid isPermaLink="true">https://community.m5stack.com/post/19569</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 16 Dec 2022 08:49:44 GMT</pubDate></item></channel></rss>