Miniature Vibration Motor 1027

아두위키 : Arduwiki
ArduWiki (토론 | 기여)님의 2024년 7월 10일 (수) 14:17 판
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

This is a miniature motor that generates vibration in a manner similar to DC motors.

Specifications

  • Recommended Input Voltage: 3V
  • Operating Current: 70mA

Example Required Hardware

  • Arduino board
  • Vibration motor

Connection

Arduino vibration motor
GND connected
D6 connected

Example Code

The example triggers the vibration motor to vibrate briefly three times.

const int VIBRATION = 6;

void setup() {
  for (int i = 0; i < 3; i++) {
    analogWrite(VIBRATION, 255 / 5 * 3);
    delay(500);
    analogWrite(VIBRATION, 0);
    delay(500);
  }
}

void loop() {
}

Execution Result