DS18B20 on Attiny85

Hi guys,

the following code is working on my Leonardo. When i heat up the temperature sensor the led turns on.

#include <OneWire.h>
#include <DallasTemperature.h>

#define ONE_WIRE_BUS 3

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
int led = 4;

void setup()
{
sensors.begin();
pinMode(led,OUTPUT);
}

void loop()
{
sensors.requestTemperatures();

if (sensors.getTempCByIndex(0) > 26)
{ digitalWrite(led,HIGH); }
else
{ digitalWrite(led,LOW); }
}

I have uploaded this code to an Attiny85. Unfortunately the led does not turn on.
(programming the Attiny is working with the Leonardo).

Hope for your help. Thanks…

Take a look at two recent threads about DS18B20 on Attiny84/85