This project deserves all credits to Dr. John A. Bullinaria from the School of Computer Science of The University of Birmingham, UK.
You can find the base code in: John Bullinaria 2004
And the explanation here: John Bullinaria NN C Code Explanation
I'm trying to implement this code in a quadcopter based on PID controller.