This paper presents the design of a sliding mode control (SMC) for trajectory tracking of an unmanned aerial vehicle (UAV), quadrotor. A simplified model of the quadrotor is used for the controller design. The robustness of the controller is verified through simulations, and also through data analysis from the experiments in the 3DR Arducopter platform. The SMC algorithms are implemented in a microcontroller that communicates with a human machine interface (HMI), which monitors the behavior and stability of the state variables. The results show effectiveness of the control technique for maintaining stability in the quadrotor under different operating scenarios.