Circuit:
Programming 0 to 9 :
#include<Servo.h>
Servo s1;
Servo s2;
Servo s3;
Servo s4;
Servo s5;
Servo s6;
Servo s7;
void setup() {
s1.attach(2);
s2.attach(3);
s3.attach(4);
s4.attach(5);
s5.attach(6);
s6.attach(7);
s7.attach(8);
}
void loop() {
s1.write(180); //Type 0
s2.write(180);
s3.write(180);
s4.write(180);
s5.write(90);
s6.write(180);
s7.write(90);
delay(2000);
s1.write(180); //Type 1
s2.write(180);
s3.write(90);
s4.write(90);
s5.write(180);
s6.write(90);
s7.write(90);
delay(2000);
s1.write(180); //Type 2
s2.write(90);
s3.write(180);
s4.write(180);
s5.write(180);
s6.write(180);
s7.write(180);
delay(2000);
s1.write(180); //Type 3
s2.write(180);
s3.write(180);
s4.write(90);
s5.write(180);
s6.write(180);
s7.write(180);
delay(2000);
s1.write(180); //Type 4
s2.write(180);
s3.write(90);
s4.write(90);
s5.write(90);
s6.write(90);
s7.write(180);
delay(2000);
s1.write(90); //Type 5
s2.write(180);
s3.write(180);
s4.write(90);
s5.write(90);
s6.write(180);
s7.write(180);
delay(2000);
s1.write(90); //Type 6
s2.write(180);
s3.write(180);
s4.write(180);
s5.write(90);
s6.write(180);
s7.write(180);
delay(2000);
s1.write(180); //Type 7
s2.write(180);
s3.write(90);
s4.write(90);
s5.write(180);
s6.write(180);
s7.write(90);
delay(2000);
s1.write(180); //Type 8
s2.write(180);
s3.write(180);
s4.write(180);
s5.write(90);
s6.write(180);
s7.write(180);
delay(2000);
s1.write(180); //Type 9
s2.write(180);
s3.write(180);
s4.write(90);
s5.write(90);
s6.write(180);
s7.write(180);
delay(2000);
}
Download stl file and programming click....
Demo Video:
Comentarios