Practical 2
Practical 2
Switches
⚫ Two switches and two DC motor are connected with
Arduino UNO R3. Write a code to control DC motor
as per given table.
Switch 2 Switch 1 Motor1 Motor2 Robot
Movement
0 0 CW CW Forward
0 1 OFF CW Left
1 0 CW OFF Right
1 1 ACW ACW Backward
CW – clockwise direction
ACW – Anti-clockwise direction
Modification
⚫ Connect a third switch to modify as per given table