Component knowledge
Motor
Motor is a device that converts electrical energy into mechanical energy. Motor consists of two parts: stator
and rotor. When motor works, the stationary part is stator, and the rotating part is rotor. Stator is usually the
outer case of motor, and it has terminals to connect to the power. Rotor is usually the shaft of motor, and can
drive other mechanical devices to run. Diagram below is a small DC motor with two pins.
When motor get connected to the power supply, it will rotate in one direction. Reverse the polarity of power
supply, then motor rotates in opposite direction.
+ - - +
L293D
L293D is a chip integrated with 4-channel motor drive. You can drive a unidirectional motor with 4 ports or a
bi-directional motor with 2 port or a stepper motor.