Once the board has been programmed, to check if everything is ok, just put an object in front of the sensor and notice if the on-board LED (controlled by the Echo pin) of the Digispark flashes as in the following video: this means that the HC-SR04 is generating ultrasounds and receiving those bounced back from the object.