<?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[DSB1820 Onewire sensor on SiPy]]></title><description><![CDATA[<p dir="auto">I want to use the DSB1820 Onewire temperature sensor to read the temp and send the data to Sigfox.<br />
How do I import the ds18x20 module? I am getting the error:</p>
<pre><code>Traceback (most recent call last):
File &quot;&lt;stdin&gt;&quot;, line 2, in &lt;module&gt;
ImportError: no module named 'ds18x20'
</code></pre>
<p dir="auto">I have pasted the <a href="/uploads/files/1487282583111-ds18x20.py">ds18x20.py</a> into the folder my other py files and project is in. Is that not where it goes?<br />
Is it the right library for DSB1820? I got it from <a href="https://forum.pycom.io/topic/303/ds18b20-temperature-sensor/16">here</a>.</p>
<p dir="auto">I've setup my Sipy as:<br />
VCC = 3.3V pin<br />
Ground = GND<br />
Data = G17</p>
]]></description><link>https://forum.pycom.io/topic/680/dsb1820-onewire-sensor-on-sipy</link><generator>RSS for Node</generator><lastBuildDate>Thu, 11 Jun 2026 19:38:59 GMT</lastBuildDate><atom:link href="https://forum.pycom.io/topic/680.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 16 Feb 2017 22:13:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Thu, 16 Feb 2017 22:38:50 GMT]]></title><description><![CDATA[<p dir="auto">I want to use the DSB1820 Onewire temperature sensor to read the temp and send the data to Sigfox.<br />
How do I import the ds18x20 module? I am getting the error:</p>
<pre><code>Traceback (most recent call last):
File &quot;&lt;stdin&gt;&quot;, line 2, in &lt;module&gt;
ImportError: no module named 'ds18x20'
</code></pre>
<p dir="auto">I have pasted the <a href="/uploads/files/1487282583111-ds18x20.py">ds18x20.py</a> into the folder my other py files and project is in. Is that not where it goes?<br />
Is it the right library for DSB1820? I got it from <a href="https://forum.pycom.io/topic/303/ds18b20-temperature-sensor/16">here</a>.</p>
<p dir="auto">I've setup my Sipy as:<br />
VCC = 3.3V pin<br />
Ground = GND<br />
Data = G17</p>
]]></description><link>https://forum.pycom.io/post/4228</link><guid isPermaLink="true">https://forum.pycom.io/post/4228</guid><dc:creator><![CDATA[sk]]></dc:creator><pubDate>Thu, 16 Feb 2017 22:38:50 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Thu, 16 Feb 2017 22:23:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/792">@sk</a> Could you please post a snippet of your code so we can see what the issue might be?</p>
]]></description><link>https://forum.pycom.io/post/4230</link><guid isPermaLink="true">https://forum.pycom.io/post/4230</guid><dc:creator><![CDATA[bucknall]]></dc:creator><pubDate>Thu, 16 Feb 2017 22:23:01 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Thu, 16 Feb 2017 22:28:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/823">@bucknall</a></p>
<pre><code>from machine import Pin
from ds18x20 import DS18X20
d=DS18X20(Pin('G17', mode=Pin.OUT))
result=d.read_temps()
print(result)
</code></pre>
<p dir="auto">![0_1487284020711_Capture4.png](Uploading 100%)</p>
]]></description><link>https://forum.pycom.io/post/4231</link><guid isPermaLink="true">https://forum.pycom.io/post/4231</guid><dc:creator><![CDATA[sk]]></dc:creator><pubDate>Thu, 16 Feb 2017 22:28:07 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Thu, 16 Feb 2017 22:33:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/792">@sk</a> where have you placed the <a href="http://ds18x20.py" target="_blank" rel="noopener noreferrer nofollow">ds18x20.py</a> file? Normally I use this file structure for my library .py file (imports):</p>
<ul>
<li>/flash
<ul>
<li>/lib
<ul>
<li><a href="http://ds18x20.py" target="_blank" rel="noopener noreferrer nofollow">ds18x20.py</a></li>
</ul>
</li>
</ul>
<pre><code>- boot.py
- main.py</code></pre>
</li>
</ul>
]]></description><link>https://forum.pycom.io/post/4232</link><guid isPermaLink="true">https://forum.pycom.io/post/4232</guid><dc:creator><![CDATA[bucknall]]></dc:creator><pubDate>Thu, 16 Feb 2017 22:33:04 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Thu, 16 Feb 2017 22:44:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/823">@bucknall</a><br />
How do I structure it that way. Currently when I open up a project I have all my py files in /flash i.e <a href="http://boot.py" target="_blank" rel="noopener noreferrer nofollow">boot.py</a>, <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow">main.py</a>, <a href="http://ds18x20.py" target="_blank" rel="noopener noreferrer nofollow">ds18x20.py</a> and my <a href="http://tempSensor.py" target="_blank" rel="noopener noreferrer nofollow">tempSensor.py</a> are on the same folder.</p>
<p dir="auto">![0_1487285028222_Capture4.PNG](Uploading 100%)</p>
]]></description><link>https://forum.pycom.io/post/4234</link><guid isPermaLink="true">https://forum.pycom.io/post/4234</guid><dc:creator><![CDATA[sk]]></dc:creator><pubDate>Thu, 16 Feb 2017 22:44:20 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Thu, 16 Feb 2017 22:54:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/792">@sk</a> is this from your <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow">main.py</a> or your <a href="http://tempSensor.py" target="_blank" rel="noopener noreferrer nofollow">tempSensor.py</a>?</p>
]]></description><link>https://forum.pycom.io/post/4235</link><guid isPermaLink="true">https://forum.pycom.io/post/4235</guid><dc:creator><![CDATA[bucknall]]></dc:creator><pubDate>Thu, 16 Feb 2017 22:54:30 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Thu, 16 Feb 2017 22:56:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/823">@bucknall</a> im running from my <a href="http://tempsensor.py" target="_blank" rel="noopener noreferrer nofollow">tempsensor.py</a>.</p>
]]></description><link>https://forum.pycom.io/post/4236</link><guid isPermaLink="true">https://forum.pycom.io/post/4236</guid><dc:creator><![CDATA[sk]]></dc:creator><pubDate>Thu, 16 Feb 2017 22:56:06 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Thu, 16 Feb 2017 23:00:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/792">@sk</a> Ok, when you import the module ds18x20 it should work fine if it's in the same folder as your <a href="http://tempSensor.py" target="_blank" rel="noopener noreferrer nofollow">tempSensor.py</a>.</p>
<p dir="auto">If you open your REPL (either in Pymakr or another tool) and type the following commands, what is your output?</p>
<pre><code>import os
os.listdir('/flash')
</code></pre>
<p dir="auto">This should show your the file structure of /flash</p>
]]></description><link>https://forum.pycom.io/post/4237</link><guid isPermaLink="true">https://forum.pycom.io/post/4237</guid><dc:creator><![CDATA[bucknall]]></dc:creator><pubDate>Thu, 16 Feb 2017 23:00:03 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Thu, 16 Feb 2017 23:05:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/823">@bucknall</a>  I did this in my <a href="http://tempsensor.py" target="_blank" rel="noopener noreferrer nofollow">tempsensor.py</a> file:</p>
<pre><code>from machine import Pin
#from ds18x20 import DS18X20
import os
os.listdir('/flash')
#d=DS18X20(Pin('G17', mode=Pin.OUT))
#result=d.read_temps()
#print(result)
</code></pre>
<p dir="auto">Which gave this output:</p>
<pre><code>Running TempSensor.py
&gt;
MicroPython v1.8.6-422-g516b861 on 2017-02-07; SiPy with ESP32
Type &quot;help()&quot; for more information.
&gt;&gt;&gt;</code></pre>
]]></description><link>https://forum.pycom.io/post/4238</link><guid isPermaLink="true">https://forum.pycom.io/post/4238</guid><dc:creator><![CDATA[sk]]></dc:creator><pubDate>Thu, 16 Feb 2017 23:05:40 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Thu, 16 Feb 2017 23:08:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/792">@sk</a> I think you need to either wrap the code in a print statement to see an output</p>
<pre><code>print(os.listdir('/flash'))
</code></pre>
<p dir="auto">or run it from the REPL to see the output</p>
<pre><code>&gt;&gt;&gt; import os
&gt;&gt;&gt; os.listdir('/flash')</code></pre>
]]></description><link>https://forum.pycom.io/post/4239</link><guid isPermaLink="true">https://forum.pycom.io/post/4239</guid><dc:creator><![CDATA[bucknall]]></dc:creator><pubDate>Thu, 16 Feb 2017 23:08:23 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Thu, 16 Feb 2017 23:13:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/823">@bucknall</a></p>
<pre><code>Running TempSensor.py
['boot.py', 'sys', 'lib', 'cert', 'main.py', 'project.pymakr']
&gt;
MicroPython v1.8.6-422-g516b861 on 2017-02-07; SiPy with ESP32
Type &quot;help()&quot; for more information.
&gt;&gt;&gt; 
</code></pre>
<p dir="auto">So How can I add it to lib?</p>
]]></description><link>https://forum.pycom.io/post/4240</link><guid isPermaLink="true">https://forum.pycom.io/post/4240</guid><dc:creator><![CDATA[sk]]></dc:creator><pubDate>Thu, 16 Feb 2017 23:13:13 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Thu, 16 Feb 2017 23:16:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/792">@sk</a> it looks like your <a href="http://ds18x20.py" target="_blank" rel="noopener noreferrer nofollow">ds18x20.py</a> didn't upload to the SiPy. To use the <strong>sync</strong> function in Pymakr, to copy your code over to your SiPy, you need to first create a <em>project</em>.</p>
<p dir="auto">Once you're got a new project, if you create a folder called 'lib' and place the <a href="http://ds18x20.py" target="_blank" rel="noopener noreferrer nofollow">ds18x20.py</a> into this folder and then press <strong>sync</strong>, it should put it into the lib folder!</p>
]]></description><link>https://forum.pycom.io/post/4241</link><guid isPermaLink="true">https://forum.pycom.io/post/4241</guid><dc:creator><![CDATA[bucknall]]></dc:creator><pubDate>Thu, 16 Feb 2017 23:16:39 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Fri, 17 Feb 2017 00:14:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/823">@bucknall</a><br />
Ok so I made a new project called 'TempSensor' and in the same folder of this project I made another folder called 'lib'.<br />
Inside lib folder I pasted the <a href="http://ds18x20.py" target="_blank" rel="noopener noreferrer nofollow">ds18x20.py</a>, <a href="http://onewire.py" target="_blank" rel="noopener noreferrer nofollow">onewire.py</a> and onewire.diff libraries.<br />
Then in the project folder I made <a href="http://boot.py" target="_blank" rel="noopener noreferrer nofollow">boot.py</a>:</p>
<pre><code>from machine import UART
import os
import machine
uart = UART(0, 115200)
os.dupterm(uart)
</code></pre>
<p dir="auto">and <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow">main.py</a>:</p>
<pre><code>import os
import pycom
from machine import Pin
#from ds18x20 import DS18X20
print(os.listdir('/flash'))
pycom.rgbled(0x000000) # rblack
#d=DS18X20(Pin('G17', mode=Pin.OUT))
#result=d.read_temps()
#print(result)
machine.idle()
</code></pre>
<p dir="auto">Then I synced and then ran my program and this is the output:</p>
<pre><code>Running main.py
['__init__.py', 'sys', 'lib', 'cert', 'TempSensor.py', 'main.py', 'boot.py', 'project.pymakr']
&gt;
MicroPython v1.8.6-422-g516b861 on 2017-02-07; SiPy with ESP32
Type &quot;help()&quot; for more information.
&gt;&gt;&gt; 
</code></pre>
<p dir="auto">As you can see the library is still not there. But if I go</p>
<pre><code>print(os.listdir('/flash/lib'))
</code></pre>
<p dir="auto">The output says its there:</p>
<pre><code>Running main.py
['ds18x20.py']
&gt;
MicroPython v1.8.6-422-g516b861 on 2017-02-07; SiPy with ESP32
Type &quot;help()&quot; for more information.
&gt;&gt;&gt; 
</code></pre>
<p dir="auto">Why doesn't it show the <a href="http://onewire.py/diff" target="_blank" rel="noopener noreferrer nofollow">onewire.py/diff</a>?</p>
]]></description><link>https://forum.pycom.io/post/4244</link><guid isPermaLink="true">https://forum.pycom.io/post/4244</guid><dc:creator><![CDATA[sk]]></dc:creator><pubDate>Fri, 17 Feb 2017 00:14:24 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Fri, 17 Feb 2017 00:32:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/823">@bucknall</a><br />
Ok all libraries seem to be in the right place now. My <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow">main.py</a>:</p>
<pre><code>import os
import pycom
from machine import Pin
from ds18x20 import DS18X20

#pycom.rgbled(0x000000) # rblack

d=DS18X20(Pin('G17', mode=Pin.OUT))
result=d.read_temps()
print(result)
machine.idle()
</code></pre>
<p dir="auto">My output however gives this error:</p>
<pre><code>Syncing the project with the SiPy. Please wait...
Successfully synced!


MicroPython v1.8.6-422-g516b861 on 2017-02-07; SiPy with ESP32
Type &quot;help()&quot; for more information.
&gt;&gt;&gt; 

Running main.py
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 8, in &lt;module&gt;
  File &quot;/flash/lib/ds18x20.py&quot;, line 47, in __init__
  File &quot;/flash/lib/onewire.py&quot;, line 246, in scan
  File &quot;/flash/lib/onewire.py&quot;, line 274, in _search
  File &quot;/flash/lib/onewire.py&quot;, line 148, in write_byte
NameError: name 'pin_lalue' is not defined
&gt;
MicroPython v1.8.6-422-g516b861 on 2017-02-07; SiPy with ESP32
Type &quot;help()&quot; for more information.
&gt;&gt;&gt; 
</code></pre>
<p dir="auto">&quot;pin_lalue&quot; isn't in any of my files or libraries? Why is it looking for something that doesn't exist?</p>
]]></description><link>https://forum.pycom.io/post/4245</link><guid isPermaLink="true">https://forum.pycom.io/post/4245</guid><dc:creator><![CDATA[sk]]></dc:creator><pubDate>Fri, 17 Feb 2017 00:32:44 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Fri, 17 Feb 2017 01:36:10 GMT]]></title><description><![CDATA[<p dir="auto">I've also followed this <a href="https://docs.pycom.io/pycom_esp32/pycom_esp32/tutorial/includes/onewire.html?highlight=import" target="_blank" rel="noopener noreferrer nofollow">pycom Onewire DS18X20</a> tutorial but the output is again looking for something that doesn't exist:</p>
<pre><code>Running main.py
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 9, in &lt;module&gt;
  File &quot;/flash/lib/onewire.py&quot;, line 162, in __init__
  File &quot;/flash/lib/onewire.py&quot;, line 124, in scan
  File &quot;/flash/lib/onewire.py&quot;, line 132, in _search_rom
  File &quot;/flash/lib/onewire.py&quot;, line 36, in reset
NameError: name 'enabXe_irq' is not defined
&gt;
MicroPython v1.8.6-422-g516b861 on 2017-02-07; SiPy with ESP32
Type &quot;help()&quot; for more information.
&gt;&gt;&gt; 
</code></pre>
<p dir="auto">at line 36 in the onewire library it is enable_irq(1)... not enabXe_irq. Paymkr is replacing the 'l' with 'X'???</p>
]]></description><link>https://forum.pycom.io/post/4246</link><guid isPermaLink="true">https://forum.pycom.io/post/4246</guid><dc:creator><![CDATA[sk]]></dc:creator><pubDate>Fri, 17 Feb 2017 01:36:10 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Fri, 17 Feb 2017 07:14:39 GMT]]></title><description><![CDATA[<p dir="auto">use official onewire driver<br />
<a href="https://github.com/pycom/pycom-libraries/tree/master/examples/onewire" target="_blank" rel="noopener noreferrer nofollow">https://github.com/pycom/pycom-libraries/tree/master/examples/onewire</a><br />
it work for me on Wipy2.0</p>
<p dir="auto"><strong>but first check if your file is not corrupted</strong><br />
try compare it in text editor e.g Notepad++, Total Comander, WinMerge ...<br />
i mean - read file e.g. throught ftp and compare with file you thing that should be stored<br />
because i see in your error message corrupted name &quot;enabXe_irq&quot; which not exists in onewire driver</p>
]]></description><link>https://forum.pycom.io/post/4249</link><guid isPermaLink="true">https://forum.pycom.io/post/4249</guid><dc:creator><![CDATA[livius]]></dc:creator><pubDate>Fri, 17 Feb 2017 07:14:39 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Sun, 19 Feb 2017 22:26:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/199">@livius</a></p>
<p dir="auto"><a href="/uploads/files/1487543078176-onewire.py">0_1487543077630_onewire.py</a><br />
this doesnt have enableXe_irq, I don't think its the files thats faulty. Something is wrong with my code or the order I'm doing things, I'm pretty sure, I just don't know what?</p>
]]></description><link>https://forum.pycom.io/post/4332</link><guid isPermaLink="true">https://forum.pycom.io/post/4332</guid><dc:creator><![CDATA[sk]]></dc:creator><pubDate>Sun, 19 Feb 2017 22:26:44 GMT</pubDate></item><item><title><![CDATA[Reply to DSB1820 Onewire sensor on SiPy on Mon, 20 Feb 2017 07:15:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/792">@sk</a><br />
Is this what you downloaded from board or what you have on the computer?<br />
Previously (for me still - however less than before) there are some corruption of files stored on the board.</p>
<p dir="auto">try something like this</p>
<pre><code>f = open('onewire.py', 'r+')
d = f.readall()
print(d)
</code></pre>
<p dir="auto">do you see some corruption in content?</p>
<p dir="auto">Try also downloading file throught ftp - is this file same as your on the computer?</p>
]]></description><link>https://forum.pycom.io/post/4337</link><guid isPermaLink="true">https://forum.pycom.io/post/4337</guid><dc:creator><![CDATA[livius]]></dc:creator><pubDate>Mon, 20 Feb 2017 07:15:16 GMT</pubDate></item></channel></rss>