Created
March 2, 2017 15:31
-
-
Save michaels123/34ea27cc3974b953aedc2e4164e01660 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <LiquidCrystal.h> | |
#include <OneWire.h> | |
#include <DallasTemperature.h> | |
#define ONE_WIRE_BUS 2 | |
OneWire oneWire(ONE_WIRE_BUS); | |
DallasTemperature sensors(&oneWire); | |
LiquidCrystal lcddisplay(12, 11, 5, 4, 3, 2); | |
void setup() | |
{ | |
lcddisplay.begin(16, 2); | |
lcddisplay.print("Temperatur:"); | |
sensors.begin(); | |
} | |
void loop() | |
{ | |
sensors.requestTemperatures(); | |
lcddisplay.setCursor(0, 1); | |
lcddisplay.print(sensors.getTempCByIndex(0)); | |
delay(2000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment