<?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 sensor calibration]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">does this unit need to be calibrated? The temperature is showing 20oC while my thermostat and my old mercury thermometer is showing 17!</p>
]]></description><link>https://community.m5stack.com/topic/882/env-sensor-calibration</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 04:56:45 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/882.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 14 Apr 2019 09:49:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ENV sensor calibration on Thu, 03 Oct 2019 14:04:16 GMT]]></title><description><![CDATA[<p dir="auto">You need to use a command line program called ampy to move the libraries across. This guy wrote a guide in which he used the standard micropython firmware and added his own libraries <a href="https://www.hackster.io/andreas-motzek/execute-logo-on-m5stack-esp32-basic-with-micropython-3713fd" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.hackster.io/andreas-motzek/execute-logo-on-m5stack-esp32-basic-with-micropython-3713fd</a></p>
]]></description><link>https://community.m5stack.com/post/5805</link><guid isPermaLink="true">https://community.m5stack.com/post/5805</guid><dc:creator><![CDATA[lukasmaximus]]></dc:creator><pubDate>Thu, 03 Oct 2019 14:04:16 GMT</pubDate></item><item><title><![CDATA[Reply to ENV sensor calibration on Thu, 03 Oct 2019 12:02:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lukasmaximus" aria-label="Profile: lukasmaximus">@<bdi>lukasmaximus</bdi></a><br />
Where can I find instructions how to integrate the M5Stack libraries into the MicroPython standard software on a M5Stack Core Grey/Black.</p>
]]></description><link>https://community.m5stack.com/post/5800</link><guid isPermaLink="true">https://community.m5stack.com/post/5800</guid><dc:creator><![CDATA[Wolli01]]></dc:creator><pubDate>Thu, 03 Oct 2019 12:02:07 GMT</pubDate></item><item><title><![CDATA[Reply to ENV sensor calibration on Thu, 03 Oct 2019 11:18:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lukasmaximus" aria-label="Profile: lukasmaximus">@<bdi>lukasmaximus</bdi></a> Yes, I thought about that, but how do I get the display to work? I can't cope with that.</p>
]]></description><link>https://community.m5stack.com/post/5799</link><guid isPermaLink="true">https://community.m5stack.com/post/5799</guid><dc:creator><![CDATA[Wolli01]]></dc:creator><pubDate>Thu, 03 Oct 2019 11:18:47 GMT</pubDate></item><item><title><![CDATA[Reply to ENV sensor calibration on Thu, 03 Oct 2019 10:26:38 GMT]]></title><description><![CDATA[<p dir="auto">The I2c implementation in UIflow firmware is a little weird, I think if you were to flash the standard micropython firmware and put the necessary libraries on there this would work fine.</p>
]]></description><link>https://community.m5stack.com/post/5797</link><guid isPermaLink="true">https://community.m5stack.com/post/5797</guid><dc:creator><![CDATA[lukasmaximus]]></dc:creator><pubDate>Thu, 03 Oct 2019 10:26:38 GMT</pubDate></item><item><title><![CDATA[Reply to ENV sensor calibration on Thu, 03 Oct 2019 09:40:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lukasmaximus" aria-label="Profile: lukasmaximus">@<bdi>lukasmaximus</bdi></a> Yeah, no problems.<br />
Enclosed the code that runs in Wipy over Python.</p>
<p dir="auto"><a href="http://SHT31.PY" target="_blank" rel="noopener noreferrer nofollow ugc">SHT31.PY</a><br />
from machine import I2C<br />
import time</p>
<p dir="auto">R_HIGH   = const(1)<br />
R_MEDIUM = const(2)<br />
R_LOW    = const(3)</p>
<p dir="auto">class SHT31(object):<br />
"""<br />
Diese Klasse implementiert eine Schnittstelle zur SHT31 Temperatur und Luftfeuchtigkeit.<br />
Sensor von Sensirion.<br />
"""<br />
# Diese statische Karte hilft, den Heap und die Programmlogik sauber zu halten.<br />
_map_cs_r = {<br />
True: {<br />
R_HIGH : b'\x2c\x06',<br />
R_MEDIUM : b'\x2c\x0d',<br />
R_LOW: b'\x2c\x10'<br />
},<br />
False: {<br />
R_HIGH : b'\x24\x00',<br />
R_MEDIUM : b'\x24\x0b',<br />
R_LOW: b'\x24\x16'<br />
}<br />
}</p>
<pre><code>def __init__(self, i2c, addr=0x44):
    """
    Initialisiert ein Sensorobjekt auf dem angegebenen I2C-Bus, auf das von der
    angegebene Adresse.
    """
    if i2c == None or i2c.__class__ != I2C:
        raise ValueError('I2C-Objekt als Argument benÃ¶tigt!')
    self._i2c = i2c
    self._addr = addr

def _send(self, buf):
    """
    Sendet das angegebene Pufferobjekt Ã¼ber I2C an den Sensor.
    """
    self._i2c.writeto(self._addr, buf)

def _recv(self, count):
    """
    Lesen von Bytes vom Sensor Ã¼ber I2C. Die Anzahl der Bytes kann angegeben werden.
    als Argument.
    Liefert ein Bytearray fÃ¼r das Ergebnis.
    """
    return self._i2c.readfrom(self._addr, count)

def _raw_temp_humi(self, r=R_HIGH, cs=True):
    """
    Lesen Sie die Rohtemperatur und Luftfeuchtigkeit vom Sensor ab und Ã¼berspringen Sie CRC. ÃœberprÃ¼fung.
    Liefert ein Tupel fÃ¼r beide Werte in dieser Reihenfolge.
    """
    if r not in (R_HIGH, R_MEDIUM, R_LOW):
        raise ValueError('Falscher Wiederholbarkeitswert angegeben!')
    self._send(self._map_cs_r[cs][r])
    time.sleep_ms(50)
    raw = self._recv(6)
    return (raw[0] &lt;&lt; 8) + raw[1], (raw[3] &lt;&lt; 8) + raw[4]

def get_temp_humi(self, resolution=R_HIGH, clock_stretch=True, celsius=True):
    """
    Lesen Sie die Temperatur in Grad Celsius oder Fahrenheit und relativ dazu ab.
    Feuchtigkeit. AuflÃ¶sung und TaktverlÃ¤ngerung kÃ¶nnen festgelegt werden.
    Liefert ein Tupel fÃ¼r beide Werte in dieser Reihenfolge.
    """
    t, h = self._raw_temp_humi(resolution, clock_stretch)
    if celsius:
        temp = -45 + (175 * (t / 65535.0))
    else:
        temp = -49 + (315 * (t / 65535.0))
    return temp, 100 * (h / 65535.0)
</code></pre>
<p dir="auto"><a href="http://Main.PY" target="_blank" rel="noopener noreferrer nofollow ugc">Main.PY</a><br />
#Sensor SHT31-----------------------------------------------------------<br />
if (Sensorwahl) == 'sht31':</p>
<pre><code>i2c = I2C(0, I2C.MASTER, baudrate=100000)
sensor = sht31.SHT31(i2c, addr=0x44)
temp_humi = sensor.get_temp_humi()
time.sleep(0.6)

pycom.rgbled(0xff007f) # magenta
pycom.heartbeat(False) #Lampe ausschalten um Energie zu sparen

Temp1 = round(temp_humi[0],2)
Feuchte1 = round(temp_humi[1],2)
time.sleep(1)

print('----------------------------------------------------------------------')
print("Ohne Runden = Temperature: {} Â°C | Humidity: {} %".format(temp_humi[0], temp_humi[1]))
print('----------------------------------------------------------------------')

#Ãœbergabe der Sensorwerte---------------------------------------
Temp1 = (Temp1 + 0) #Ãœbergabe und Differenzeingabe
Feuchte1 = (Feuchte1 + 0) #Ãœbergabe und Differenzeingabe
#Ãœbergabe der Sensorwerte---------------------------------------
</code></pre>
<p dir="auto">#Sensor SHT31-----------------------------------------------------------</p>
]]></description><link>https://community.m5stack.com/post/5796</link><guid isPermaLink="true">https://community.m5stack.com/post/5796</guid><dc:creator><![CDATA[Wolli01]]></dc:creator><pubDate>Thu, 03 Oct 2019 09:40:59 GMT</pubDate></item><item><title><![CDATA[Reply to ENV sensor calibration on Thu, 03 Oct 2019 09:27:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wolli01" aria-label="Profile: Wolli01">@<bdi>Wolli01</bdi></a> The sensor you sent us a link to, is it on a breakout board with pinouts? and is it possible to communicate with it via i2c?</p>
]]></description><link>https://community.m5stack.com/post/5794</link><guid isPermaLink="true">https://community.m5stack.com/post/5794</guid><dc:creator><![CDATA[lukasmaximus]]></dc:creator><pubDate>Thu, 03 Oct 2019 09:27:56 GMT</pubDate></item><item><title><![CDATA[Reply to ENV sensor calibration on Wed, 02 Oct 2019 11:56:23 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><br />
<a href="https://www.sensirion.com/en/environmental-sensors/humidity-sensors/digital-humidity-sensors-for-various-applications/" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.sensirion.com/en/environmental-sensors/humidity-sensors/digital-humidity-sensors-for-various-applications/</a></p>
<p dir="auto">Of these I have the SHT 20/21 and the SHT 30/31 on my<br />
Pycom Wipy/Lopy are doing well.</p>
]]></description><link>https://community.m5stack.com/post/5785</link><guid isPermaLink="true">https://community.m5stack.com/post/5785</guid><dc:creator><![CDATA[Wolli01]]></dc:creator><pubDate>Wed, 02 Oct 2019 11:56:23 GMT</pubDate></item><item><title><![CDATA[Reply to ENV sensor calibration on Wed, 02 Oct 2019 04:55:39 GMT]]></title><description><![CDATA[<p dir="auto">Connecting the sensor depends on many things like operating characteristics.<br />
Can you post a link to the sensor you are looking at?<br />
Sometime its just a case of plug and play, sometimes its a case of hacing some code.</p>
]]></description><link>https://community.m5stack.com/post/5784</link><guid isPermaLink="true">https://community.m5stack.com/post/5784</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 02 Oct 2019 04:55:39 GMT</pubDate></item><item><title><![CDATA[Reply to ENV sensor calibration on Wed, 02 Oct 2019 04:50:58 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> Yes, the humidity results are really bad.<br />
How can I e.g. connect my own sensor SHT series?<br />
On my Pycom Wipy I have something like this running successfully.<br />
I like to set the code to change it for M5Stack.</p>
]]></description><link>https://community.m5stack.com/post/5783</link><guid isPermaLink="true">https://community.m5stack.com/post/5783</guid><dc:creator><![CDATA[Wolli01]]></dc:creator><pubDate>Wed, 02 Oct 2019 04:50:58 GMT</pubDate></item><item><title><![CDATA[Reply to ENV sensor calibration on Sun, 14 Apr 2019 11:16:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/charlestondance" aria-label="Profile: charlestondance">@<bdi>charlestondance</bdi></a> I suppose you can try using the maths blocks but I have to ask (don't take this personally) are you sure your how thermostat is calibrated?</p>
<p dir="auto">In UIFlow, the temperature is returned as a value and so you can add that to a maths block as a variable number.<br />
Below is a quick code test (sorry had to retrieve the kit from the office/studio.<img src="https://i-h2.pinimg.com/564x/0c/9f/44/0c9f44900a1e017d1f09fe493369c30f.jpg" alt="alt text" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/3736</link><guid isPermaLink="true">https://community.m5stack.com/post/3736</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sun, 14 Apr 2019 11:16:20 GMT</pubDate></item><item><title><![CDATA[Reply to ENV sensor calibration on Sun, 14 Apr 2019 10:43:22 GMT]]></title><description><![CDATA[<p dir="auto">Well that is not much use then!</p>
<p dir="auto">Is the problem the supplier or the device or the code?</p>
<p dir="auto">If the offset is the same within a certain range surely you could just subtract a constant? the issue is i have no way to measure humidity and pressure independently.</p>
]]></description><link>https://community.m5stack.com/post/3735</link><guid isPermaLink="true">https://community.m5stack.com/post/3735</guid><dc:creator><![CDATA[charlestondance]]></dc:creator><pubDate>Sun, 14 Apr 2019 10:43:22 GMT</pubDate></item><item><title><![CDATA[Reply to ENV sensor calibration on Sun, 14 Apr 2019 10:13:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/charlestondance" aria-label="Profile: charlestondance">@<bdi>charlestondance</bdi></a> said in <a href="/post/3728">ENV sensor calibration</a>:</p>
<blockquote>
<p dir="auto">Hi,</p>
<p dir="auto">does this unit need to be calibrated? The temperature is showing 20oC while my thermostat and my old mercury thermometer is showing 17!</p>
</blockquote>
<p dir="auto">There currently isn't any way to calibrate it.</p>
]]></description><link>https://community.m5stack.com/post/3733</link><guid isPermaLink="true">https://community.m5stack.com/post/3733</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sun, 14 Apr 2019 10:13:50 GMT</pubDate></item></channel></rss>