<?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[1-wire and SD-Card]]></title><description><![CDATA[<p dir="auto">Hello,<br />
I have the problem that I can no longer address 1-Wire DS18B20 sensors when I have accessed the SD card. I have already tried connecting the sensors to different pins (2, 5 and 26). Without accessing the SD card, I can query the sensors without any problem.<br />
What can be the reason for this?<br />
I have used several libraries for the DS18B20 sensors in combination with the <a href="https://platformio.org/lib/show/1/OneWire" target="_blank" rel="noopener noreferrer nofollow ugc">oneWire library</a> from Paul Stoffregen<br />
<img src="https://imgur.com/PTF3yU6" alt="6x-DS18B20" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/topic/2642/1-wire-and-sd-card</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 11:31:25 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2642.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 23 Dec 2020 00:18:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 1-wire and SD-Card on Tue, 19 Jan 2021 16:37:15 GMT]]></title><description><![CDATA[<p dir="auto">God day Hague!<br />
I would appreciate if you can explain how to get DS18B20 (multiple sensor on 1 wire) to work in UIFLOW. Tryed for days to find anything about it on web but get only one fantastic way to get it work only for one sensor.<br />
Please share your knowledge :)</p>
<p dir="auto">Best regards Dario</p>
]]></description><link>https://community.m5stack.com/post/11903</link><guid isPermaLink="true">https://community.m5stack.com/post/11903</guid><dc:creator><![CDATA[Darra]]></dc:creator><pubDate>Tue, 19 Jan 2021 16:37:15 GMT</pubDate></item><item><title><![CDATA[Reply to 1-wire and SD-Card on Sat, 26 Dec 2020 23:45:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zontex" aria-label="Profile: zontex">@<bdi>zontex</bdi></a> OK, you're right, without code it's hard to help. Sorry, my mistake.<br />
In the meantime, I tried a little more to understand the problem better. It's not that the 1-Wire connection doesn't work anymore at all. It's just that the devices are no longer found immediately on the bus after a lot of data has been written to the SD card.<br />
In detail, this call does not find any devices after I have previously written a large block of data to the SD card:</p>
<pre><code>DS18B20.begin();
device_count = DS18B20.getDS18Count();
</code></pre>
<p dir="auto">But if I call DS18B20.begin() twice, all devices are found. Therefore I have placed the function in a loop:</p>
<pre><code>int trial_count = 0;
int device_count = 0;
do{
  DS18B20.begin();
  device_count = DS18B20.getDS18Count();
  trial_count++;
} while (device_count == 0 &amp;&amp; trial_count &lt; 10);
M5.Lcd.printf("\nDevices found: %i\nafter %i tries\n\n", device_count, trial_count);
</code></pre>
<p dir="auto">Now all devices are found after one call, if I did not write any data to the SD card before. However, if I write a larger amount of data to the SD card in between, then 2 attempts are needed until all devices are found.</p>
<p dir="auto">I think the 1-Wire bus is somehow disturbed by the transfer of the large amounts of data. This does not happen with small data. Anyway, the solution is OK and makes sense.</p>
]]></description><link>https://community.m5stack.com/post/11380</link><guid isPermaLink="true">https://community.m5stack.com/post/11380</guid><dc:creator><![CDATA[hague]]></dc:creator><pubDate>Sat, 26 Dec 2020 23:45:30 GMT</pubDate></item><item><title><![CDATA[Reply to 1-wire and SD-Card on Fri, 25 Dec 2020 10:07:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zontex" aria-label="Profile: zontex">@<bdi>zontex</bdi></a> Haha you say UIFlow, there is no 1-wire support!<br />
To my knowledge the "stack" is not really stackable because of a design flaw, using pins for  addressing modules,  and not a bus!</p>
]]></description><link>https://community.m5stack.com/post/11369</link><guid isPermaLink="true">https://community.m5stack.com/post/11369</guid><dc:creator><![CDATA[Efried]]></dc:creator><pubDate>Fri, 25 Dec 2020 10:07:42 GMT</pubDate></item><item><title><![CDATA[Reply to 1-wire and SD-Card on Wed, 23 Dec 2020 04:57:41 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/hague" aria-label="Profile: hague">@<bdi>hague</bdi></a> is there any way you can paste your code here so we can take a look? also, are you using Arduino IDE / UIFlow or MicroPython?</p>
]]></description><link>https://community.m5stack.com/post/11352</link><guid isPermaLink="true">https://community.m5stack.com/post/11352</guid><dc:creator><![CDATA[Zontex]]></dc:creator><pubDate>Wed, 23 Dec 2020 04:57:41 GMT</pubDate></item></channel></rss>