Coder Social home page Coder Social logo

Comments (5)

mcsakoff avatar mcsakoff commented on August 18, 2024

What is your Python version?

from pydigitemp.

brennmat avatar brennmat commented on August 18, 2024

I am using Python 2.7.10 for this.

I just found the solution -- my bad!

From staring at the pydigtemp code, the DS1820 class looks like it is intended to work with the DS18S20 (but I have not DS18S20 chips, so can't test this). However, the DS1820 class does not work with the DS18B20 chip. Then I stumbled over the DS18B20 class, which works with the DS18B20 chip works like a charm. So the code is all good and works as it is!

However, the example code given in the README file should propably be a bit more explicit about which class to use for which chips. From the README I was under the impression that the DS1820 class is intended to work with all DS18x20 chips (DS1820, DS18S20, DS18B20 and maybe others).

As far as I can tell:

  • DS1820 and DS18S20 chips work with DS1820 class
  • DS18B20 chip works with the DS18B20 class

from pydigitemp.

mcsakoff avatar mcsakoff commented on August 18, 2024

Could you please change

    from digitemp.device import DS1820

to

    from digitemp.device import DS18B20

and check if it works?
Note that B in the class name: DS18B20

from pydigitemp.

brennmat avatar brennmat commented on August 18, 2024

Yes, that works (see above). Just crossed messages...

from pydigitemp.

mcsakoff avatar mcsakoff commented on August 18, 2024

Thanks! I'll update the REAME to make it clear what class shall be used in what case.
e17a729

from pydigitemp.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.