SG90伺服馬達模組
Last updated
Last updated
#include <Servo.h>
Servo __myservo7;
void setup()
{
__myservo7.attach(7);
__myservo7.attach(7,700,2500);
}
void loop()
{
__myservo7.write((map(0,0,180,700,2500)));
delay(1000);
__myservo7.write((map(90,0,180,700,2500)));
delay(1000);
__myservo7.write((map(180,0,180,700,2500)));
delay(1000);
}