<?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[ENV III unit on M5Stack CoreInk]]></title><description><![CDATA[<p dir="auto">Hi,<br />
Very n00b question, but how do I use the ENV III sensor on CoreInk? T<br />
From sample code <a href="https://docs.m5stack.com/en/unit/envIII" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.m5stack.com/en/unit/envIII</a>, I tried this but <code>UNIT_ENV.h</code> does not exist on CoreInk</p>
<pre><code>#include "M5CoreInk.h"
#include "UNIT_ENV.h"

SHT3X sht30;
QMP6988 qmp6988;
</code></pre>
<p dir="auto">Same <code>#include "M5_ENV.h"</code> does not exist either.<br />
Thanks.</p>
]]></description><link>https://community.m5stack.com/topic/4476/env-iii-unit-on-m5stack-coreink</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 23:55:27 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4476.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 29 Jul 2022 12:43:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ENV III unit on M5Stack CoreInk on Tue, 30 Aug 2022 04:58:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/teastain" aria-label="Profile: teastain">@<bdi>teastain</bdi></a> Nice work.</p>
]]></description><link>https://community.m5stack.com/post/18492</link><guid isPermaLink="true">https://community.m5stack.com/post/18492</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Tue, 30 Aug 2022 04:58:25 GMT</pubDate></item><item><title><![CDATA[Reply to ENV III unit on M5Stack CoreInk on Mon, 29 Aug 2022 17:48:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> The std ENV Library works with Stamp-PICO, but not Stamp-C3.<br />
The GET works with PICO, not C3.<br />
Bringing the library code into the Arduino void loop() works for both products.<br />
I re-wrote the standard library to remove the GET and instead used this:<br />
#include &lt;SHT3Xnew.h&gt;<br />
unsigned int data[2];<br />
float sensor() {<br />
Wire.beginTransmission(0x44);<br />
Wire.write(0x2C);<br />
Wire.write(0x06);<br />
if (Wire.endTransmission() != 0) {<br />
Serial.println("not = 0 ");<br />
}<br />
delay(50);<br />
Wire.requestFrom(0x44, 2);<br />
data[0] = Wire.read();<br />
data[1] = Wire.read();<br />
delay(50);<br />
return ((((data[0] * 256.0) + data[1]) * 175) / 65535.0) - 45;<br />
}</p>
<p dir="auto">This Library works with both, but is just a test, only reads cTemp,  ;)</p>
]]></description><link>https://community.m5stack.com/post/18489</link><guid isPermaLink="true">https://community.m5stack.com/post/18489</guid><dc:creator><![CDATA[teastain]]></dc:creator><pubDate>Mon, 29 Aug 2022 17:48:13 GMT</pubDate></item><item><title><![CDATA[Reply to ENV III unit on M5Stack CoreInk on Mon, 29 Aug 2022 05:44:08 GMT]]></title><description><![CDATA[<p dir="auto">As you have noticed, "Get" isn't a stand alone function instead it is used to retrieve values and so is required to be used with a function.</p>
]]></description><link>https://community.m5stack.com/post/18481</link><guid isPermaLink="true">https://community.m5stack.com/post/18481</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 29 Aug 2022 05:44:08 GMT</pubDate></item><item><title><![CDATA[Reply to ENV III unit on M5Stack CoreInk on Sun, 28 Aug 2022 19:41:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/vuhn88" aria-label="Profile: vuhn88">@<bdi>vuhn88</bdi></a> Good to know! I also tried last week to run an ENVII on Stamp-C3 but the "get" didn't get! So I put the code inline as you did and it worked fine, then I wrote a new library (with the proven inline code) as a function with Return (value) and that worked as well. (just completed last night!)<br />
The "get" is somehow the problem. Cheers!</p>
]]></description><link>https://community.m5stack.com/post/18477</link><guid isPermaLink="true">https://community.m5stack.com/post/18477</guid><dc:creator><![CDATA[teastain]]></dc:creator><pubDate>Sun, 28 Aug 2022 19:41:20 GMT</pubDate></item><item><title><![CDATA[Reply to ENV III unit on M5Stack CoreInk on Sun, 28 Aug 2022 05:25:36 GMT]]></title><description><![CDATA[<p dir="auto">Not sure if you're referring to the hat or port <code>ENV III</code> but the <code>get</code> method of <code>SHT3X</code> didn't have the correct <code>begin</code> for the <code>ENV III</code> hat, so I brought the method into main and manually set up <code>Wire.begin(25, 26)</code> as seen below:</p>
<pre><code>#include "M5CoreInk.h"
#include "M5_ENV.h"

//SHT3X sht30;
QMP6988 qmp6988;

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

Ink_Sprite InkPageSprite(&amp;M5.M5Ink);

void setup() {

  M5.begin();
  Wire.begin(25, 26);

  qmp6988.init();

  if ( !M5.M5Ink.isInit()) {
    Serial.printf("Ink Init faild");
    while (1) delay(100);
  }
  M5.M5Ink.clear();   //Clear screen.
  delay(1000);
  if ( InkPageSprite.creatSprite(0, 0, 200, 200, true) != 0) {
    Serial.printf("Ink Sprite creat faild");
  }
}


byte getVal()
{
  unsigned int data[6];

  // Start I2C Transmission
  Wire.beginTransmission(0x44);

  // Send measurement command
  Wire.write(0x2C);
  Wire.write(0x06);

  // Stop I2C transmission
  if (Wire.endTransmission() != 0)
    return 1;

  delay(200);

  // Request 6 bytes of data
  Wire.requestFrom(0x44, 6);

  // Read 6 bytes of data
  // cTemp msb, cTemp lsb, cTemp crc, humidity msb, humidity lsb, humidity crc
  for (int i = 0; i &lt; 6; i++) {
    data[i] = Wire.read();
  };

  delay(50);

  if (Wire.available() != 0)
    return 2;

  // Convert the data
  float cTemp = ((((data[0] * 256.0) + data[1]) * 175) / 65535.0) - 45;
  tmp = (cTemp * 1.8) + 32;
  hum = ((((data[3] * 256.0) + data[4]) * 100) / 65535.0);

  return 0;
}

void loop() {
  pressure = qmp6988.calcPressure();
  if (getVal() == 0) {
    char buf[20];

    snprintf(buf, 20, "Temp: %2.1f F", tmp);
    InkPageSprite.drawString(40, 20, buf);

    snprintf(buf, 20, "Humi: %2.0f%%", hum);
    InkPageSprite.drawString(40, 40, buf);

    snprintf(buf, 20, "Pres: %2.0f Pa", pressure);
    InkPageSprite.drawString(40, 60, buf);
  }

  InkPageSprite.pushSprite(); //Push the sprite to the screen.
  delay(1000);
}
</code></pre>
<p dir="auto">It's pretty basic in functionality, but it works for the most part. And again, this is for the <code>ENV III</code> hat.</p>
]]></description><link>https://community.m5stack.com/post/18472</link><guid isPermaLink="true">https://community.m5stack.com/post/18472</guid><dc:creator><![CDATA[vuhn88]]></dc:creator><pubDate>Sun, 28 Aug 2022 05:25:36 GMT</pubDate></item><item><title><![CDATA[Reply to ENV III unit on M5Stack CoreInk on Fri, 29 Jul 2022 13:03:50 GMT]]></title><description><![CDATA[<p dir="auto">Ok - I found. You have to use <code>#include "M5_ENV.h"</code> and include the library <strong>M5UNIT-ENV</strong> in Arduino.</p>
]]></description><link>https://community.m5stack.com/post/18110</link><guid isPermaLink="true">https://community.m5stack.com/post/18110</guid><dc:creator><![CDATA[aafortinet]]></dc:creator><pubDate>Fri, 29 Jul 2022 13:03:50 GMT</pubDate></item></channel></rss>