Technical requirements
There are several code examples in this chapter to illustrate the concepts that we cover. You can run all of these code examples on your Arduino Uno. We will also cover feedback control, and as a practical example, we will develop the code to turn a DC motor with an encoder into a position-controlled servo motor. For this example, you will need your Arduino Uno, a DC motor with a quadrature encoder, and a motor driver PCB, ideally with an ST L298 driver chip (since this is what we use in the example). The Arduino motor shield will not work for this example unless you are comfortable modifying it to reroute some of its wire traces.