Quantity | 3+ units | 10+ units | 30+ units | 50+ units | More |
---|---|---|---|---|---|
Price /Unit | $4.15 | $4.06 | $3.93 | $3.76 | Contact US |
Smart Car Motor Drive Module L9110S Dual Channel DC Motor Stepper Motor Drive Board H Bridge
Specs:
- Dimension: 25mmx20mmx12mm
- Dual channel drive motor
- With testing programme
- Reference:
#include<reg52.h>
sbit MOTOR_A_1 = P2 ^ 1;
sbit MOTOR_A_2 = P2 ^ 2;
sbit MOTOR_B_1 = P2 ^ 3;
sbit MOTOR_B_2 = P2 ^ 4;
void delay(unsigned long m)
{
while(m--);
}
void forward(void)
{
MOTOR_A_1 = 1;
MOTOR_A_2 = 0;
MOTOR_B_1 = 1;
MOTOR_B_2 = 0;
}
void backward(void)
{
MOTOR_A_1 = 0;
MOTOR_A_2 = 1;
MOTOR_B_1 = 0;
MOTOR_B_2 = 1;
}
void main(void)
{
EX0 = 1;
EX1 = 1;
EA = 1;
while(1)
{
forward();
delay(20000);
backward();
delay(20000);
}
}