Arduino Motor Shield L293 SKU DRI0001
Part | Datasheet |
---|---|
![]() |
DRI0001 (pdf) |
PDF Datasheet Preview |
---|
Arduino Motor Shield L293 SKU DRI0001 Arduino Motor Shield L293 V2 DRI0001 Contents • 1 Introduction • 2 Diagram • 3 Pin Allocation • 4 Sample Code • 5 Schematics Introduction This motor shield allows Arduino to drive two channel DC motors. It uses a L293B chip which deliveries output current up to 1A 2A for L298P version each channel. The speed control is achieved through conventional PWM which can be obtained from Arduino’s PWM output Pin 5 and The enable/disable function of the motor control is signalled by Arduino Digital Pin 4 and Roboduino Motor Shield uses PWM output Pin 6 and 9 and Digital Pin 7 and The Motor shield is powered directly from Arduino. It is strongly advised that use external power supply on Arduino to power the Arduino instead of the USB power supply. Diagram Motor Shield V1 Motor Shield V2 Pin Allocation Pin Digital 4 Digital 5 Digital 6 Digital 7 Function Motor 2 Direction control Motor 2 PWM control Motor 1 PWM control Motor 1 Direction control Sample Code //This motor shield use Pin 6,5,7,4 to control the motor // Simply connect your motors to M1+,M1-,M2+,M2// Upload the code to Arduino/Roboduino // Through serial monitor, type 'a','s', 'w','d','x' to control the motor // // Last modified on 24/12/2009 int EN1 = 6 int EN2 = 5 //Roboduino Motor shield uses Pin 9 int IN1 = 7 int IN2 = 4 //Latest version use pin 4 instead of pin 8 void setup int i // for i=6;i<=9;i++ //For Roboduino Motor Shield // pinMode i, OUTPUT //set pin 6,7,8,9 to output mode for i = 4 i <= 7 i++ //For Arduino Motor Shield pinMode i, OUTPUT //set pin 4,5,6,7 to output mode Serial.begin 9600 ; void loop int x, delay_en; char val; while 1 val = Serial.read ; if val != -1 switch val case 'w'://Move ahead Motor1 100, true //You can change the speed, such as Motor 50,tru e Motor2 100, true ; break; case 'x'://move back Motor1 100, false ; Motor2 100, false break case 'a'://turn left Motor1 100, false Motor2 100, true break case 'd'://turn right Motor1 100, true Motor2 100, false break case 's'://stop Motor1 0, false Motor2 0, false break; Powered By DFRobot 2008-2017 |
More datasheets: 808-38230 | 808-38303 | 808-38304 | ATA5505-P3QW | FST16245MTDX | FST16245MTD | 7573-ID/5-NA | FQB7N10LTM | FQI7N10LTU | FEB156 |
Notice: we do not provide any warranties that information, datasheets, application notes, circuit diagrams, or software stored on this website are up-to-date or error free. The archived DRI0001 Datasheet file may be downloaded here without warranties.