Onewire and DS18B20

Questions and discussion about The WiPy board.
You can buy one at the store.
Target audience: Users with a WiPy.
Brunus
Posts: 5
Joined: Sat Oct 15, 2016 8:02 am

Re: Onewire and DS18B20

Postby 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.

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

Re: Onewire and DS18B20

Postby on4bhm » Thu May 18, 2017 4:25 pm

Hi,

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))
result=d.read_temps()
print(result)

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

what is wrong?
any help is appreciated.


Return to “The WiPy”

Who is online

Users browsing this forum: No registered users and 1 guest