A proportional-integral-derivative (PID) controller
is a feedback loop that continuously calculates an error value e(t) as
the difference between a desired setpoint (SP) and a measured process
variable (PV) and applies a correction based on proportional, integral,
and derivative terms. In this study, a photocell will be used to test
the ambient light and apply the feedback loop to a code.