If you're used to working with servos with Arduino and B4R, you'll quickly understand how to use an electric motor with its ESC, as this interface behaves exactly like a servo, except that we'll be controlling the motor's speed rather than the servo's rotation angles. This is made possible by the flexibility of the rServo library!
There are, of course, several types of suitable motors and ESCs. We will choose the following model for our example.
The ESC includes:
- 2 wires for battery connection (Red + and Black (GND) -)
- 2 or 3 wires to power the motor (In our example, there are 2 wires, 1 red and 1 black. Reversing the connection to the motor will change the motor's direction of rotation). When there are 3 wires, they are often yellow.
- 1 microswitch
- 1 connecting cable with 3 wires (White: PWM signal, Red: 5 volts, Black: GND). This small cable will allow us to control our motor like a servo motor.
There are, of course, several types of suitable motors and ESCs. We will choose the following model for our example.
The ESC includes:
- 2 wires for battery connection (Red + and Black (GND) -)
- 2 or 3 wires to power the motor (In our example, there are 2 wires, 1 red and 1 black. Reversing the connection to the motor will change the motor's direction of rotation). When there are 3 wires, they are often yellow.
- 1 microswitch
- 1 connecting cable with 3 wires (White: PWM signal, Red: 5 volts, Black: GND). This small cable will allow us to control our motor like a servo motor.