Here comes the slightly complicated part. We will need to connect the ESCs, receiver, GPS, and SONAR to the flight controller. To make things easier, there is a labeled diagram of the wiring above. First, solder all of the pin headers that are supplied onto the controller board.
ESCs
Taking note of the arms, connect the ESC wires from each arm into pin headers 1-4 of the ESC section on the flight controller, with the front left arm being the first and the back left arm being the last.
Receiver
Using male to male servo extension leads, connect pins 1-8 of the receiver to the corresponding pins on the flight controller. If your receiver supports PPM (Pulse Position Modulation) mode, you only need to connect one wire onto pin 1 of the controller board.
GPS and SONAR
At this stage, we should have 1 pin header still free on the receiver section of the flight controller. Plug the 3 wires from the GPS unit into the empty port. The SONAR module will be plugged into the ESC section of the board.
After all of the electronics are connected, we can make the build look cleaner by using zip ties to secure the loose wires and to minimize the chances of a wire coming loose mid-flight from the vibrations.
Failsafes
Setting the failsafe on any model aircraft that will be flying any great distance is important as a loss of signal at this distance can damage property and even injure people. To set the failsafe on the Naze32 flight controller, go into the cleanflight software and click on the failsafe section. From there, you can set the flight controller up so that with GPS, if the receiver loses signal, the quadcopter will automatically return to it's home coordinates, or take off position. Once you have set the flight controller to do whatever you want in the case of the loss of signal, go to whichever model of receiver you have and set the failsafe there such that when there is no longer signal, it will activate one of the free auxiliary channels which will tell the flight controller to go into failsafe mode. This extra step may seem like a lot of work at first, but when you are flying kilometers away from yourself and you lose signal, you will be glad you had set it up.