Professional Documents
Culture Documents
College of Engineering
Department of Computer and Communication Engineering
Real-Time and Embedded Systems (0107445)
Assignment 4
Title DC Motor Control For Robot Movement
Student Name SUBHI MAHER SUBHI KURDIEH
Student ID Number 320200112106
Page 1
Objective
Apparatus
1.TinkerCad Simulation
2.Embedded board(ArduinoUno)
3.ArduinoIDEsoftware
4.2-DCMotors
5.1-754410/L293DHBridge Driver
6.Breadboard
Program Code
// Motor A connections
int enA = 9;
int in1 = 8;
int in2 = 7;
// Motor B connections
int enB = 3;
int in3 = 5;
int in4 = 4;
void setup() {
// Set all the motor control pins to outputs
pinMode(enA, OUTPUT);
pinMode(enB, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(in3, OUTPUT);
pinMode(in4, OUTPUT);
Discussion / results
We will notice the results on the DC motor as a movement (forward, backward, left, right)
and we can control the movement period.
Page 2