write()ではなく、writeMicroseconds()を使う
http://tetsuakibaba.jp/index.php?page=workshop/ServoBasis/main
#include <Servo.h> Servo sv; void setup() { Serial.begin(9600); sv.attach(9); } void loop() { for(int i=0;i<180;i++){ int j = map(i,0,180,800,2300); sv.writeMicroseconds(j); Serial.println(i); delay(10); } for(int i=180;i>0;i--){ int j = map(i,0,180,800,2300); sv.writeMicroseconds(j); Serial.println(i); delay(10); } }