- Look up
DirectCurrent_Motor_Module
in the Library Manager and install the latest version - Insert the following snippet
#include <DirectCurrent-Motor-Module.h>
class DirectCurrent = { int input1, int input2, int dc };
Parameters
input1
IN1 Pininput2
IN2 Pindc
DC Pin
Example
DirectCurrent example = { 1, 2, 3 };
[name].move(int mode1, int mode2, int speed);
Description Move the DC motor
Parameters
mode1
Enable or disable theinput1
pin with0
and1
mode2
Enable or disable theinput2
pin with0
and1
speed
Motor speedMax. Value
255
Returns
- Boolean
Example
example.move(1, 0, 200);
example.move(0, 1, 200);