# I can not connect the DS18B20

**URL:** <https://forum.xod.io/t/i-can-not-connect-the-ds18b20/297>\
**Category:** Uncategorized\
**Created:** [December 26, 2017, 9:36am UTC](https://forum.xod.io/t/i-can-not-connect-the-ds18b20/297 "2017-12-26T09:36:51Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![maiklbaklan](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@maiklbaklan](https://forum.xod.io/u/maiklbaklan)\
**Post date:** [December 26, 2017, 9:36am UTC](https://forum.xod.io/t/i-can-not-connect-the-ds18b20/297/1 "2017-12-26T09:36:51Z")

</div>

A very common temperature sensor DS18B20. First I connected this scheme.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/e3d65ca8685a3e0568481ebbd4aa42bb8767175c.jpg)  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/865cbe48e5d36ed730a57a4b5dda35086a5ec1cc.png)  
Then I realized that I had to connect not to D2, but to A2.  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/db7b05633ca308c78f9e17346d137a142747057e.png)  
There was a reaction to my connection to this port, but the temperature data is not correct.

---

<div class="post-metadata">

**Author:** ![nkrkv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/nkrkv/32/8_2.png) [@nkrkv](https://forum.xod.io/u/nkrkv)\
**Post date:** [December 26, 2017, 10:29am UTC](https://forum.xod.io/t/i-can-not-connect-the-ds18b20/297/2 "2017-12-26T10:29:10Z")

</div>

Hmmm… That’s because you’re trying to read DS18B20 sensor with a node for TMP36 thermometer which is _absolutely_ another piece of hardware.

DS18B20 is not supported out of the box yet. Although you can create a node to read it in C++. See recent [guide articles](https://xod.io/docs/#Making-your-own-nodes) to learn how. If it’s too hard for you, I can only suggest waiting until someone implements it and publish as a library.

I wanted to support the DS18B20, but I’m short of time, so can’t promise when I could done it.

---

<div class="post-metadata">

**Author:** ![maiklbaklan](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@maiklbaklan](https://forum.xod.io/u/maiklbaklan)\
**Post date:** [January 8, 2018, 4:06pm UTC](https://forum.xod.io/t/i-can-not-connect-the-ds18b20/297/3 "2018-01-08T16:06:26Z")

</div>

Many thanks, for attention to my little problem.  
Yes, it’s difficult for me, but I’ll still try to figure it out, since if I do not use XOD, then the sensor works fine, but in XOD excellent procedures for visualizing the process of the contender. But as Socrates said: Who wants (ds18by20), he wants opportunities, who does not want - he searches for reasons (not supported).  
As I understood, the main problem is that the sensors can be several OneWire, Tell me how to work with OneWire modules.

---

<div class="post-metadata">

**Author:** ![nkrkv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/nkrkv/32/8_2.png) [@nkrkv](https://forum.xod.io/u/nkrkv)\
**Post date:** [January 9, 2018, 3:16pm UTC](https://forum.xod.io/t/i-can-not-connect-the-ds18b20/297/4 "2018-01-09T15:16:15Z")

</div>

OK, OK… Here is your cake 😉

[https://xod.io/libs/nkrkv/ds18b20/ds18b20-thermometer/](https://xod.io/libs/nkrkv/ds18b20/ds18b20-thermometer/)

Add the `nkrkv/ds18b20` library and you’re ready to work with your DS18B20 like with any other thermometer.

---

<div class="post-metadata">

**Author:** ![maiklbaklan](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@maiklbaklan](https://forum.xod.io/u/maiklbaklan)\
**Post date:** [January 10, 2018, 5:57pm UTC](https://forum.xod.io/t/i-can-not-connect-the-ds18b20/297/6 "2018-01-10T17:57:59Z")

</div>

Many thanks for such a wonderful New Year gift.  
Cool! I also learned how to add libraries …

---

<div class="post-metadata">

**Author:** ![maiklbaklan](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@maiklbaklan](https://forum.xod.io/u/maiklbaklan)\
**Post date:** [January 10, 2018, 7:23pm UTC](https://forum.xod.io/t/i-can-not-connect-the-ds18b20/297/7 "2018-01-10T19:23:59Z")

</div>

Try to connect and to d7 as in the example. Tried in A0 and d0. The port at XOD exhibited the corresponding. I tried in XOD to put port 3 and connect to a3 and d3 when debugging my zero readings of the sensor.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/cff722dadd53f371871c3357dff3139cf92b6f7e.jpg) ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/bd6059d4120bbb8ae6e4ef1428c5af01233fd2d4.png)

---

<div class="post-metadata">

**Author:** ![dox](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dox/32/424_2.png) [@dox](https://forum.xod.io/u/dox)\
**Post date:** [January 11, 2018, 6:58am UTC](https://forum.xod.io/t/i-can-not-connect-the-ds18b20/297/8 "2018-01-11T06:58:37Z")

</div>

@maiklbaklan:

Tra to trigger UPD with a clock pulse.

---

<div class="post-metadata">

**Author:** ![nkrkv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/nkrkv/32/8_2.png) [@nkrkv](https://forum.xod.io/u/nkrkv)\
**Post date:** [January 11, 2018, 9:36am UTC](https://forum.xod.io/t/i-can-not-connect-the-ds18b20/297/9 "2018-01-11T09:36:24Z")

</div>

> [@dox](#):
>
> Tra to trigger UPD with a clock pulse.

Oh, good catch! @maiklbaklan in its current setup the update is only made once, on boot. Looks like the sensor has not enough time to complete temperature conversion. Set `UPD` to `Continuously`.

---

<div class="post-metadata">

**Author:** ![maiklbaklan](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@maiklbaklan](https://forum.xod.io/u/maiklbaklan)\
**Post date:** [January 11, 2018, 4:35pm UTC](https://forum.xod.io/t/i-can-not-connect-the-ds18b20/297/10 "2018-01-11T16:35:37Z")

</div>

comrades, do you think I have not tried Continuously

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/cf4db5aabcb7c57d38fa426beea6d0406f02fa9d.png)  
Oh, I just did not drive around the sensor, so nothing happens.

---

<div class="post-metadata">

**Author:** ![nkrkv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/nkrkv/32/8_2.png) [@nkrkv](https://forum.xod.io/u/nkrkv)\
**Post date:** [January 12, 2018, 9:11am UTC](https://forum.xod.io/t/i-can-not-connect-the-ds18b20/297/11 "2018-01-12T09:11:42Z")

</div>

Unfortunately, my sensor works:

Sorry for shaking 😊

Anyone who also has a DS18B20, please, check it with XOD too. So I could better understand the source of the problem. Is it something wrong with my sample or the one @maiklbaklan has? Or maybe there’re several models exist with slight differences in protocol.

---

<div class="post-metadata">

**Author:** ![maiklbaklan](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@maiklbaklan](https://forum.xod.io/u/maiklbaklan)\
**Post date:** [January 13, 2018, 5:59pm UTC](https://forum.xod.io/t/i-can-not-connect-the-ds18b20/297/12 "2018-01-13T17:59:59Z")

</div>

Shaking hands - do not worry! You’re not a professional cameraman. From your video, everything is clear.  
Russian New Year’s miracle. In Russia before 1917 there was a calendar different from the current one. In the tradition there is a celebration of the Russian New Year, this occurs from 13 to 14 January. The same sensors, one and the same arduino, now worked, turned on two temperature sensors.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/a59f5d1a2548ced22e6190ccfad91af8010ab776.png)  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/cf51cbd81dcf1438b5f34456c9a6e462f7bfc645.jpg)  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/8fd0b5ee0a13aed0db57e4cfeb3377561edcc291.png)  
And even three sensors. Connected to ports 2, 3, 4.  
The second sensor I hold in my hands, because it shows a high temperature.  
Comrade, great respect for your attention to your followers.  
Thank you.  
P.S. I’ll go have a drink of vodka and play a balalaika with my bear 🙂

---

<div class="post-metadata">

**Author:** ![nkrkv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/nkrkv/32/8_2.png) [@nkrkv](https://forum.xod.io/u/nkrkv)\
**Post date:** [January 14, 2018, 8:53pm UTC](https://forum.xod.io/t/i-can-not-connect-the-ds18b20/297/13 "2018-01-14T20:53:42Z")

</div>

Glad to hear they started to work! Please, mark the topic as solved if you think so (three dots button → checkmark icon).

> [@maiklbaklan](#):
>
> P.S. I’ll go have a drink of vodka and play a balalaika with my bear

🤣 Do not forget a matryoshka and shapka-ushanka hat

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)\
**Post date:** [January 16, 2018, 8:54pm UTC](https://forum.xod.io/t/i-can-not-connect-the-ds18b20/297/14 "2018-01-16T20:54:06Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
