Skip to content

Instantly share code, notes, and snippets.

@michaels123
Created March 2, 2017 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaels123/34ea27cc3974b953aedc2e4164e01660 to your computer and use it in GitHub Desktop.
Save michaels123/34ea27cc3974b953aedc2e4164e01660 to your computer and use it in GitHub Desktop.
#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