Skip to content

Gravity__130_DC_Motor_SKU__DFR0411

Angelo edited this page Sep 22, 2016 · 3 revisions

Gravity: 130 DC Motor

Introduction

Gravity 130 DC motor is a very interesting module, the module does not need additional motor driver board, you can use Arduino board to drive it easily. And the speed control could be realized with PWM signal. Very popular with DIY project

Specification

  • Operating Voltage: 5v
  • Interface type: Gravity 3-pin digital sensor interface
  • Dimension: 52 * 27 mm
  • Weight: 40 g

Tutorial

We will use Arduino to control module speed.

Preparation

Connection

connection diagram

Sample code

Copy the sample code, and paste it in the Arduino IDE

/* 130 DC Motor
  by DFRobot <https:www.dfrobot.com>

 */

 int motorPin = 3;   //Motor drive pin D3
 int motorSpeed;     //Define motor speed

 void setup()
 {
   Serial.begin(9600);
 }

 void loop()
 {

   for(motorSpeed = 0 ; motorSpeed <= 255; motorSpeed+=5)
   {
     analogWrite(motorPin, motorSpeed);   //PWM speed control
     delay(30);
   }
   for(motorSpeed = 255 ; motorSpeed >= 0; motorSpeed-=5)
   {
     analogWrite(motorPin, motorSpeed);   //PWM speed control
     delay(30);
   }
 }                                                             |

FAQ

There are no questions about this product yet. If you have any problems or suggestions, you are welcome to email us or post on the DFRobot forum!

center For any questions/advice/cool ideas to share, please visit the DFRobot Forum.

More

Schematic SVG file

link=http://www.dfrobot.com/ get it from dfrobot store or dfrobot distributor.

Clone this wiki locally