Arduino:How to use motor driver module L293D
Motor Driver L293D module This motor driver module has 4 input pins which will be connected to the arduino and 4 output pins which will be connected with the two motors,and there are 3 more pins which is 12v input ,5v input and a GND(negative terminal) the module can be powered by 12v supply or a 5v supply.and it can control 2 motors CODE to upload int motorpin1=5; int motorpin2=6; int motorpin3=7; int motorpin4=8; void setup() { pinMode( motorpin1,OUTPUT); pinMode( motorpin2,OUTPUT); pinMode( motorpin3,OUTPUT); pinMode( motorpin4,OUTPUT); } void loop() { digitalWrite( motorpin1,HIGH); digitalWrite( motorpin2,LOW); digitalWrite( motorpin3,HIGH); digitalWrite( motorpin4,LOW); } After uploading the code ,the motors will start spinning in CLOCKWISE direction,this is because of the HIGH ,LOW sequence written in the code You can also change the direction of spinning of the motor by just changing the the