0% found this document useful (0 votes)
42 views

Prog Arduino

Uploaded by

iyed gara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Prog Arduino

Uploaded by

iyed gara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

#include<Servo.

h>
Servo serv1,serv2,serv3;
int mot1=3,mot2=4,mot3Av=5,mot3Ar=6,mot3V=10; 
void setup() {
  // put your setup code here, to run once:
pinMode(mot1,OUTPUT);
pinMode(mot2,OUTPUT);
pinMode(mot3Av,OUTPUT);
pinMode(mot3Ar,OUTPUT);
pinMode(mot3V,OUTPUT);
serv1.attach(7);
serv2.attach(8);
serv3.attach(9);
}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(mot1,1);
serv1.write(90);
delay(5000);
serv1.write(0);
serv2.write(90);
delay(5000);
serv2.write(0);
delay(5000);
digitalWrite(mot1,0);
serv3.write(90);
delay(3000);
serv3.write(0);
digitalWrite(mot2,1);
delay(100000);
analogWrite(mot3V,128);
digitalWrite(mot3Av,1);
digitalWrite(mot3Ar,0);
delay(3000);
digitalWrite(mot3Av,0);
delay(4000);
analogWrite(mot3V,128);
digitalWrite(mot3Av,0);
digitalWrite(mot3Ar,1);

You might also like