There is a noteworthy educational project that proposes to bring robots to teach. This works inside of the many frontiers humanity is working actively to solve. One of the incentives are the X Prizes.
Details of the sensors and capabilities of a robot used as a teacher.
Pseudocode and Flowcharts
Extensive explanation about how to draw flowcharts: Link
About feedback loops:
Overview of functions
Proportional Derivative Integral Control Loops ( P.I.D. )
A proportional–integral–derivative controller (PID controller) is acontrol loop feedback mechanism (controller) commonly used in industrial control systems. A PID controller continuously calculates an error value as the difference between a measured process variable and a desiredsetpoint. The controller attempts to minimize the error over time by adjustment of a control variable, such as the position of a control valve, adamper, or the power supplied to a heating element, to a new value determined by a weighted sum
Filters & implementations
Discard wrong values
PID trainer based on the Arduino library: link
Code example of a simple filter with Arduino: link
Here you can read a practical example about why filters are really needed: link
Code example with PID link
Code Examples hosted at Github