Research Article

A Novel Framework of Modelling, Control, and Simulation for Autonomous Quadrotor UAVs Utilizing Arduino Mega

Algorithm 5

ISR: interrupt subroutine.
1. Once PCI is called by pin voltage change.
2. If (last value == 0) then
3. If (new reading == 1) then
4. Last value =1;
5. Start timer;
6. Else
7. If (new reading == 0) then
8. Last value =0;
9. Receiver = time – Timer;
10. Send back the time of the pulse