Our team is trying get our robot to be self-balancing on the platforms. However we are having a lot trouble with the PID code. Specifcally, the whole thing

. Does anyone have an idea of how to do this? Or do you know of a webpage that would provide information? Your help would be greatly appreciated by all members of team 4091.