Controlling ultrasonic sonsor with digispark Attiny85

Hello guys,
I have a problem with my micro contoller:
I’m trying to controll the ‘hc-sr04’ with my Attiny85 board from digispark.
The sensor works fine, when I connect it to my Arduino.
But when I connect it to the Attiny the code doesn’t work anymore (see the code below).
The programm should just make a led blink if the distance is to small.
Instead, the led blinks the whole time.

I hope somebody can help me…

Ultrasonic.ino (689 Bytes)

Did you try to add Serial.print() lines to the code to see where and why it stopped working?