9376 Motor Miniatura (9376) [D019]
https://www.youtube.com/watch?v=SpYVBLfMmfI
* GitHub : https://github.com/rdiot/rdiot-d019.git
* Specs
VACIO | MÁXIMA EFICACIA | BLOQUEO | ||||||
V. | R.P.M. | A. | R.P.M. | A. | Kg·cm. | Kg·cm. | A. | |
3 | 4000 | 0.085 | 3190 | 0.34 | 17 | 85 | 1.35 | |
6 | 8500 | 0.1 | 7000 | 0.54 | 28 | 178 | 3 | |
9 | 12300 | 1.11 | 10650 | 0.7 | 30 | 220 | 4.5 | |
12 | 16500 | 0.125 | 14300 | 0.8 | 36.5 | 275 | 5.2 |
* Contents
- Connect
Red ----- D7
Black ----- GND
Buttton Module
S ----- D2
middle ----- 5V
- ----- GND
- Key Code
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4); // LCD2004
int R = 2;
byte lastButton = HIGH;
byte nowButton = HIGH;
int servo = 7;
void setup()
{
lcd.init(); // initialize the lcd
lcd.backlight();
lcd.print("start LCD2004");
pinMode(R, INPUT);
pinMode(servo, OUTPUT);
digitalWrite(R, HIGH);
digitalWrite(servo, LOW);
delay(1000);
lcd.clear();
}
void loop()
{
lcd.setCursor(0,0);
lcd.print("D019:9376 Motor");
byte nowButton = digitalRead(R);
lcd.setCursor(0,1);
lcd.print("value="+(String)nowButton);
if (HIGH == lastButton)
{
if (LOW == nowButton)
{
lcd.setCursor(0,2);
lcd.print("running motor ");
digitalWrite(servo, HIGH);
}
}
else
{
if (HIGH == nowButton)
{
lcd.setCursor(0,2);
lcd.print("stopped motor ");
digitalWrite(servo, LOW);
}
}
lastButton = digitalRead(R);
delay(100);
}
'3) Actuator > Motor' 카테고리의 다른 글
SG90 Camera Mount [B051] (0) | 2016.10.04 |
---|---|
Tower Pro SG90 Micro Servo (SG90) [D018] (0) | 2016.10.04 |
Helicopter Coreless DC Motor [S143] (0) | 2016.09.30 |
DC6~12V R030 Biaxial Double Axis DC Motor (R030) [D067] (0) | 2016.09.30 |
Micro 130 DC Motor [D071] (0) | 2016.09.30 |