My team is doing a broken dr4b (or 4bar-4bar). That means I can’t do the usual dr4b PID code. I will have to do a PID code for two separate 4 bars. I tried looking for an answer online and only found how to do a PID for the base. Although these were useful, one they were for bases and two I wanted not to coy and paste and actually understand what’s going on. So I come here. Does anybody know how to do one: PID control for a 4 bar, and two: explain to me how a PID actually works. Thank you in advance.
What you want to do is have a target for the second PID loop based upon the potentiometer of the first PID loop. You can actually program some really cool things by breaking it up.
But let’s say you want the classic DR4b action. So map out the values you want for the second level versus the first level. You constantly change the target value of the second PID loop. So as you move the bottom to a level, you then have the top one react to that new value and away you go.
If you want to suspend that and keep the top action at a specific value, then set the top guy’s target to a set value for a while. You can then set a new target when you get to say the static post that is empty at the beginning of the game.
I hope this makes sense…