Onewire and DS18B20

Questions and discussion about The WiPy 1.0 board and CC3200 boards.
Target audience: Users with a WiPy 1.0 or CC3200 board.
Posts: 5
Joined: Sat Oct 15, 2016 8:02 am

Re: Onewire and DS18B20

Post by Brunus » Tue Nov 22, 2016 1:01 pm

Thanks Pythoncoder !
It's a good improvement of my code.

But it's still not working, and I know why, I'm testing my code in the REPL...and I just discovered the paste mode...I had a problem with auto-indent en fact.

@Miguel : now I'm not anymore using the multithreaded firmware and it's working, no need of the not-multitheaded one.

Posts: 1
Joined: Thu May 18, 2017 4:22 pm

Re: Onewire and DS18B20

Post by on4bhm » Thu May 18, 2017 4:25 pm


I'm using a Lopy.
I can't get the ds18b20 to work.
I got a par version. so no extra vcc is needed.
the data line is pulled up with a 4K7 resisitor to 3V3
my dataline is at G22

this code gives me no errors:
from ds18x20 import DS18X20
d=DS18X20(Pin('G22', mode=Pin.OUT))

but doesn't return any values...
there is only 1 sensor connected.

what is wrong?
any help is appreciated.

SirN Check
Posts: 1
Joined: Fri Dec 15, 2017 11:11 am

Re: Onewire and DS18B20

Post by SirN Check » Fri Dec 15, 2017 12:27 pm


While the DS18x20 is "measuring" it draws extra power. ~1.5mA
Thus the "-par" version needs temporarily a much stronger pull-up.
Using a non-par version eliminates this problem.

But as the "-par" is quite nice:
I would like to see software support using an extra pin for the "strong pull-up"
Anyone up for that challenge?

See fig 6 & text in: ... S18B20.pdf

Post Reply