# Fastest OneWire (ds18b20) update rate on Raspberry Pi

**URL:** <https://discourse.nodered.org/t/fastest-onewire-ds18b20-update-rate-on-raspberry-pi/16520>\
**Category:** General\
**Created:** [9 October 2019 21:20 UTC](https://discourse.nodered.org/t/fastest-onewire-ds18b20-update-rate-on-raspberry-pi/16520 "2019-10-09T21:20:21Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [3 June 2020 04:26 UTC](https://discourse.nodered.org/t/fastest-onewire-ds18b20-update-rate-on-raspberry-pi/16520/23 "2020-06-03T04:26:29Z")

</div>

I doubt it will do well due to its synchronous code. So read spread will be high and it will block the event loop as well.

Consider this post:

> [@Quick note if you're a) reading multiple ds18b20's with a raspberry pi and b) struggling with flow stalls](https://discourse.nodered.org/t/quick-note-if-youre-a-reading-multiple-ds18b20s-with-a-raspberry-pi-and-b-struggling-with-flow-stalls/25747/3):
>
> I had a quick look at the source code of the contrib node: [https://github.com/bpmurray/node-red-contrib-ds18b20-sensor/blob/master/ds18b20-node/ds18b20-node.js](https://github.com/bpmurray/node-red-contrib-ds18b20-sensor/blob/master/ds18b20-node/ds18b20-node.js) They use synchronous file access to the sensors. This prevents the NodeJS event loop to process other tasks until the operation has finished. Depending on the sensor's resolution, the DS18B20 readings can take over a second per sensor. So the blocking behavior you described is to be expected. I see you have already found your way to usi…

---

_[View the full topic](https://discourse.nodered.org/t/fastest-onewire-ds18b20-update-rate-on-raspberry-pi/16520)._
