Armstorg Focp computer science, Assignments of Computer Science

Computer science focp worksheet

Typology: Assignments

2021/2022

Available from 01/30/2022

yuvraj-1
yuvraj-1 🇮🇳

1 document

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
DIRECT CUREENT MOTOR
AIM: To Design simple DC motor control circuit.
APPARATUS: Arduino uno, DC motor, L293D, connecting wires, push button.
CIRCUIT DIAGRAM:
CODE:
#define m1 2
#define m2 3
#define m3 4
#define m4 5
Int Pot=A0;
Int val;
pf2

Partial preview of the text

Download Armstorg Focp computer science and more Assignments Computer Science in PDF only on Docsity!

DIRECT CUREENT MOTOR

AIM: To Design simple DC motor control circuit.

APPARATUS: Arduino uno, DC motor, L293D, connecting wires, push button.

CIRCUIT DIAGRAM:

CODE:

#define m1 2 #define m2 3 #define m3 4 #define m4 5 Int Pot=A0; Int val;

Void setup() { pinMode(m1,OUTPUT); pinMode(m2,OUTPUT); pinMode(m3,OUTPUT); pinMode(m4,OUTPUT); Serail.begin(9600); } Void loop() { Val=analogRead(Pot); Val=map(val,0,1023,0,300); Serial.println(val); analogWrite(m1,val); analogWrite(m3,val); }

RESULT:

Desigining of simple DC motor control circuit using Arduino uno is verified after uploading the program.