Ultrasonic, 5V, Grd and Sig

First of all, does it work with the example sketch and wiring in the Makeblock sensor link you posted? Why not check that, first? (Note that it says if you use Dupont wire, the header should be "welded" on the module :slight_smile: )

Next, your code will not compile due to typos (e.g., "pindMode" and "OUPUT").

Lastly, although you define sig to be an OUTPUT in setup(), you switch it to INPUT in loop(), and then never switch it back to OUTPUT. From the second loop on, your digitalWrites are just toggling the internal pullup on and off. So that your digitalWrites work as intended, add pinMode(sig,OUTPUT) at the beginning of loop.

PS: regarding your question... Yes, you should be able to power the sensor using digital pins held high and low, provided the sensor doesn't draw too much current (which seems unlikely, but the Makeblock sensor link you posted doesn't give that spec). But to eliminate variables, first get it working by connecting it directly to 5v and gnd. Then try the digital pins.