No anda. Aqui mas detalles:
#include <Servo.h>
int pot=0;
int a=2;
int b=3;
int c=4;
int d=5;
Servo miServo1;
Servo miServo2;
Servo miServo3;
Servo miServo4;
void setup(){
miServo1.attach(a);
miServo2.attach(b);
miServo3.attach(c);
miServo4.attach(d);
Serial.begin(9600);
}
void loop(){
int valor=analogRead(pot);
valor=map(valor, 0, 1023, 65, 179);
valor=constrain(valor,65,179);
Serial.println(valor);
miServo1.write(valor);
miServo2.write(valor);
miServo3.write(valor);
miServo4.write(valor);
delay(400);
}
Componentes que uso:
- 1 x potenciometro 10k
- 4 x ESC rc timer 18 amp, bec: output 5v 2amp, dc:6-16,8v
- 4 x brushless motor KDA20-22L
- 1 x arduino uno
- 1 x Polymer Lithium Ion Battery - 1500mAh
conexiones:
- potenciometro: cafe-gnd, blanco al pin analogo 0, narango-5v
- ESC: todos los rojos a 5v, blancos a pin 2,3,4,5, negro a gnd.
- la bateria conectada a los 4 ESC por un cable hecho asi: 1 cable rojo soldado a 4 cables rojos, 1 cable negro conectado a 4 cables negros.
especificaciones de los motores:
Key Specifications:
Kv: 924
Suggested Prop: 11 x 4.7
Battery Config: 3S
Operating Current: 6A ~ 14A
Peak Current: 14A
Weight: 56g
Dimensions: 28 x 32mm
Shaft Size: 3.175mm
especificaciones del ESC:
http://www.rctimer.com/index.php?gOo=goods_details.dwt&goodsid=148fotos:
http://s2.subirimagenes.com/fotos/previo/thump_8186704p1000462.jpghttp://s2.subirimagenes.com/fotos/previo/thump_8186707p1000463.jpghttp://s2.subirimagenes.com/fotos/previo/thump_8186708p1000465.jpghttp://s2.subirimagenes.com/fotos/previo/thump_8186711p1000466.jpg