This won’t work, as the oreintation will most likely not ever be properly zero, and this technically isn’t PID or even a Bang Bang algorithm. (Bang bang would be going backwards if overshooting, going forwards if undershooting within a certain tolerance). I see that you’ve also blindly copied the code above and I highly discourage you from doing so without understanding it.
I have these resources for you to properly understand what the two algorithms I mentioned above:
(I know there is a tolerance in the see saw itself for balancing so it may work given some overshoot, but the function being named PID is still deceptive as it is not a PID).