Home > other >  What a great god know how to write in the loop of the arduino function? If with two potentiometer co
What a great god know how to write in the loop of the arduino function? If with two potentiometer co

Time:09-22

# include

Servo myservo1;
Servo myservo2;
Int val1;
Int val2.
Void setup ()
{
Myservo1. Attach (8);
Myservo2. Attach (9);
}

Void loop ()
{
Val1=analogRead (A0);
Val1=map (val1, 0102 3,0,180);
Myservo1. Write (val1);

Delay (5);
}

Delay (5);
}
  • Related