So after all the hard work the project was a success in my computer engineering class, got good feedback from my teacher and a lot of students from junior grades were asking about the project and how I built it and also some students are going to make a better version or a different implementation of this project next year. As I was talking to one student I realized that I made a grave mistake when I was building the web app, I used PHP. Now PHP is a nice and easy language with minimal setup and amazing documentation and resources but it's pretty awful on security and management of code. Now since I was running 2 servers (Laptop and Beaglebone), I decided to run the server on the Beaglebone and use flask to control the pins and the webapp. This will eliminate the 2 servers problem and will also make code easier to manage since Flask has a great way of running things.