Servo Motor(DM-S0090D,360): 두 판 사이의 차이

아두위키 : Arduwiki
(Created page with "{{#seo:|title=아두위키 : 아두이노 서보모터(DM-S0090D) 가이드|title_mode=append|keywords=아두이노, 정보과학, 메이커학습, 수행평가, 서보모터(DM-S0090D), 아두이노 작품, 캡스톤작품, 아두이노 예제코드|description=아두이노로 서보모터(DM-S0090D)를 제어하는 방법(기본정보, 회로, 예제 코드)을 소개합니다. 정보과학과 메이커수업에 활용가능합니다.}} File:DMS0090D대표이미지.j...")
(차이 없음)

2024년 3월 24일 (일) 15:13 판

The DM-S0090D is a 360-degree rotating servo motor. Unlike 180-degree servo motors, which are used for angle adjustment, this motor adjusts the rotation direction and speed.

Specifications

  • 360-degree continuous rotation
  • Weight: approximately 9g
  • Dimensions: 23mm12mm22.5mm
  • Torque: 1.5kg.cm at 4.8V, 1.6kg.cm at 6V
  • Operating Voltage: 4.8 ~ 6V

Example Required Hardware

  • Arduino board
  • DM-S0090D
  • Jumper cables

Connection

Arduino Uno DM-S0090D
5V +(red wire)
GND -(black wire)
7 S(orange wire)

Example Code

This example code makes the servo rotate clockwise for 1 second, then stops for 1 second, rotates counterclockwise for 1 second, and stops for 1 second, repeatedly.

#include <Servo.h> // Use the Servo motor library

Servo servo; // Declare a servo object

void setup() {
  servo.attach(7); // Assign the servo motor to pin number
  servo.write(90); // Stop the servo motor
  delay(1000);
}

void loop() {
  servo.write(60); // Rotate clockwise
  delay(1000);
  servo.write(90); // Stop
  delay(1000);
  servo.write(120); // Rotate counterclockwise
  delay(1000);
  servo.write(90); // Stop
  delay(1000);
}