GithubHelp home page GithubHelp logo

rababersaft / ds18b20 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matmunk/ds18b20

0.0 0.0 0.0 1.11 MB

Arduino library for the Maxim Integrated DS18B20 1-Wire temperature sensor.

License: MIT License

C++ 100.00%

ds18b20's Introduction

DS18B20

Arduino library for the Maxim Integrated DS18B20 1-Wire temperature sensor. This library is very simple and intuitive to use, and supports auto-discovering sensors with an optional high/low condition or manually addressing individual sensors.

For example, we can get the temperature from every sensor on the wire with just a few lines of code:

#include <DS18B20.h>

DS18B20 ds(2);

void setup() {
  Serial.begin(9600);
}

void loop() {
  while (ds.selectNext()) {
    Serial.println(ds.getTempC());
  }
}

See the included examples for more.

Installation

This library uses the OneWire library, so you will need to have this installed. Install it using the Library Manager in the Arduino IDE or download the latest release from GitHub.

In the OneWire.h file set ONEWIRE_SEARCH to 0 since the search functionality is also implemented in this library (don't do this if you need the search functionality for other 1-Wire devices). CRC must be enabled (choose whichever algorithm you prefer). This may save some space on your Arduino.

Wiring the DS18B20

The resistor shown in all the circuit diagrams is 4.7k Ohm pullup resistor.

External Power Mode

Single

A single externally powered DS18B20

Multiple

Multiple externally powered DS18B20s

Parasitic Power Mode

Single

A single parasite powered DS18B20

Multiple

Multiple parasite powered DS18B20s

Mixed Power Mode

Mixed mode DS18B20s

ds18b20's People

Contributors

matmunk avatar vincentblankfield avatar witold-markowski-sentaca avatar per1234 avatar

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.