AR00 Arduino

Tags : troubleshooting

AR01 Servo motor

DaijiroHashimoto

Servo motor 600¥ with Arduino

Circuit

Conect 3 pins to

  • GND
  • 5V
  • Digital Pin (it must PWM~ pin)

Code

#include <Servo.h>
Servo myservo;
const int SV = 3;

void setup() {
  // put your setup code here, to run once:
  myservo.attach(SV, 500, 2400);
  
}

void loop() {
  myservo.write(0);  // move motor to 0°
  delay(1000);

  myservo.write(90);  // move motor to 90°
  delay(1000);

}

Reference

https://www.arduino.cc/reference/en/libraries/servo