

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Computer science focp worksheet
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


#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); }
Desigining of simple DC motor control circuit using Arduino uno is verified after uploading the program.