在大一无聊做了一个机械臂,,用arduino完成的,,很简单,代码如下:#includeServomyservo1;Servomyservo2;Servomyservo3;voidsetup(){myservo1.attach(3);myservo2.attach(5);myservo3.attach(6);pinMode(8,OUTPUT);pinMode(9,OUTPUT);pinMode(10,OUTPUT);Serial.begin(9600);}voidloop(){inta,b,c,d,e;a=map(analogRea