I am very new to the world of Arduino and electronics so let me try to explain what is wrong with my program and hopefully someone can help me. I am building a sonar system with a ground pin, ultrasonic ping sensor, and the Arduino UNO. I have the GND pin on sensor connected to Arduino ground, Echo pin to 8, Trig pin to 9 and they are all running fine. In order for the sonar system to function i need to connect the VCC to the 5v, but when I do this my board turns off. If someone could let me know how to fix this problem it would be wonderful!
I think the issue is the board is shorting upon vcc and 5v connection but as I am new I do not understand how to fix this.
Is there another way I can connect them without the board turning off or another connection method that would get the same results.