- Look up
DirectCurrent_Motor_Modulein 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
input1IN1 Pininput2IN2 PindcDC Pin
Example
DirectCurrent example = { 1, 2, 3 };[name].move(int mode1, int mode2, int speed);Description Move the DC motor
Parameters
mode1Enable or disable theinput1pin with0and1mode2Enable or disable theinput2pin with0and1speedMotor speedMax. Value255
Returns
- Boolean
Example
example.move(1, 0, 200);
example.move(0, 1, 200);