dmaixner / esp8266-dallassensor

Simple encapsulation library for [DallasTemperature](https://github.com/milesburton/Arduino-Temperature-Control-Library) library, used for hiding OneWire and global variables.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NodeMCU ESP8266 Dallas Sensor encapsulation library

Simple encapsulation library for DallasTemperature library, used for hiding OneWire and global variables.

Usage

#include <DallasSensor.h>

void setup()
{
    Serial.begin(9600);
    Dallas.begin(13); // 13 => data pin
    Dallas.printInfo();
}

void loop()
{
    Dallas.readTemperatures();
    Serial.println("Temperature: " + String(Dallas.getTemperature(0))); // 0 => index of the first sensor
    delay(60000);
}

About

Simple encapsulation library for [DallasTemperature](https://github.com/milesburton/Arduino-Temperature-Control-Library) library, used for hiding OneWire and global variables.

License:Apache License 2.0


Languages

Language:C++ 100.0%