This is my attempt at making an "accurate" PID controller. For a quick summary on what a PID is, here is a quick summary: A PID controller is a feedback loop system that takes the output and attempts to make it match the setpoint. In this visualization, I am using rotation to show how interference and the 4 values affect the output. ------------------------------------------------------------------------- There are 3 PID values and 2 external values: -Proportional: This PID value affects how many times the output value is changed per tick. -Integral: This PID value affects how much the value is affected per change(such as changing by 5 degrees at a time). -Derivative: This PID value affects how much it will overcorrect to prepare for a sudden change in load, or in this case, interference. -Setpoint: This external value gives the PID a goal to reach, which in this case, is an angle in degrees. -Interference: This external value isn't an actual PID input or value, but rather an external factor that will affect the accuracy of the output, such as air resistance or turbulence.
This system known as a PID is used in many flight systems, machinery, and more technical programs to achieve the most accurate output possible while having as much leeway as possible. I have had some experience with these in the past, and while they have proved to be incredibly useful in various applications, I can't really think of a reason to add it to Scratch, so for the time being it is just a fun little project to play around with until it finds a use.