'TR'에 해당되는 글 1건

  1. 2016.09.30 Micro 130 DC Motor [D071]

Micro 130 DC Motor [D071]



https://www.youtube.com/watch?v=_L1XE6mWqqI


* Specs

Motor Size: 15 *20 MM

Motor Height: 29 MM (bearing set, excluding output shaft)

Output shaft: 2 MM

Output shaft length: 9 MM (starting from the front panel)

Voltage: 3 V-6V

Speed: 5000 RPM (3V); 10000RPM RPM(6V)

Weight: 14g


* Contents

This is a general-purpose motor, a weak magnetic motor, which can be started by solar energy, suitable for small toy car, using 3-6V DC voltage.


- Key Code

int motorPin = 9; //D9

void setup() {  

  pinMode(motorPin, OUTPUT);  //PWM

  Serial.begin(9600);

  Serial.println("DC Motor Input Speed 0~255");

  

}

void loop() {

  if(Serial.available())

  {

    int speed = Serial.parseInt();

    Serial.println(speed);

    analogWrite(motorPin,speed);  

  }

}

Posted by RDIoT
|