“This project shows how to control the position of DC motor via Web using a PID controller.
When user access webpage of PHPoC Blue from a web browser on Smart Phone or PC, a WebSocket connection will be created between PHPoC Blue and web browser. WebSocket connection allows to real-time exchange data between web browser and PHPoC Blue without reloading webpage.
When user rotates the needle on webpage, the rotated angle will be send to PHPoC Blue. PHPoC Blue convert angle to the equivalent position (unit is pulse), and then use PID algorithm to rotate DC motor the equivalent position.
PID library for PHPoC is available here. It also contains auto-tuning function for both position and speed.”