Now I know that the HC-SR04 ultrasonic sensor is a 5v based sensor and requires 5v power to work but I have tried on an electron powering the hc-sr04 from the 3.3v pin and it works and gives readings. But on the Boron, all leds on the board go dark and it’s simply silent when I connect the same circuit.
So my question, as a beginner is, how do I connect the boron to the ultra-sonic sensor hc-sr04.
When asking a hardware question it’s always recommended to also post a wiring schematic (possibly with accompanying hi-res photos of the setup).
In most cases with such symptoms it’s a wiring issue
This is a Photon not a Boron, so we cannot really see how you have connected your actual setup.
The Boron has only one GND pin and Vin is on the other side called VUSB and while the Photon can accept 5V signals on most of its GPIO pins the Boron cannot.
I clearly said above the image that “replace the photon image with a boron” … I couldn’t find a boron hc-sr04 schematic… but here’s another I drew myself.