- Description
- Additional information
- 제품사양
- 사용방법
- 반품/교환 안내
Description
Additional information
Additional information
Weight | 9 g |
---|
제품사양
제품사양
작동 속도: 0.3/60 degree
스톨 토크: 1.5 키로그램/센치메터
온도 범위: 0 C _ 55 C
작동 전압: 4.2 볼트 ~ 6 볼트
모든 종류의 R/C 장난감
커넥터 와이어 길이: 250 미리메터
원산지:중국산
사용방법
/*
sg90 서보 모터 사용법
sg90 서보 모터 3개의 핀
1. – 핀 -> 아두이노 GND
2. 데이타핀 -> 아두이노 PWM (아래 예제 9번핀 사용)
3. + 핀 -> 아두이노 5V
*/
#include
int servoPin = 9;
Servo servo;
int servoAngle = 0; // servo position in degrees
void setup()
{
Serial.begin(9600);
servo.attach(servoPin);
}
void loop()
{
//control the servo’s direction and the position of the motor
servo.write(45); // Turn SG90 servo Left to 45 degrees
delay(1000); // Wait 1 second
servo.write(90); // Turn SG90 servo back to 90 degrees (center position)
delay(1000); // Wait 1 second
servo.write(135); // Turn SG90 servo Right to 135 degrees
delay(1000); // Wait 1 second
servo.write(90); // Turn SG90 servo back to 90 degrees (center position)
delay(1000);
//end control the servo’s direction and the position of the motor
//control the servo’s speed
//if you change the delay value (from example change 50 to 10), the speed of the servo changes
for(servoAngle = 0; servoAngle 0; servoAngle–) //now move back the micro servo from 0 degrees to 180 degrees
{
servo.write(servoAngle);
delay(10);
}
//end control the servo’s speed
}