hi guys i have a BLDC (Radio Control Planes, Drones, Cars, FPV, Quadcopters and more - Hobbyking) and an ESC (Radio Control Planes, Drones, Cars, FPV, Quadcopters and more - Hobbyking) and i just want to know if there is a way to start the motor without arming the esc?
the thing is, the project im working on requires a constant on and off of the motor and the big problem is that i cant disable the arming of the esc. the motor seems to have atleast 5sec delay before moving, please help...
this the code im working on...based from this thread http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1226292633
// this uses the Arduino servo library included with version 0012
// caution, this code sweeps the motor up to maximum speed !
// make sure the motor is mounted securily before running.
#include <Servo.h>
Servo myservo;
void arm(){
// arm the speed controller, modify as necessary for your ESC
setSpeed(0);
delay(1000); //delay 1 second, some speed controllers may need longer
}
void setSpeed(int speed){
// speed is from 0 to 100 where 0 is off and 100 is maximum speed
//the following maps speed values of 0-100 to angles from 0-180,
// some speed controllers may need different values, see the ESC instructions
int angle = map(speed, 0, 100, 0, 180);
myservo.write(angle);
}
void setup()
{
myservo.attach(9);
//arm();
}
void loop()
{
int speed;
// sweep up from 0 to to maximum speed in 20 seconds
for(speed = 0; speed <= 100; speed += 5) {
setSpeed(speed);
delay(1000);
}
// sweep back down to 0 speed.
for(speed = 95; speed > 0; speed -= 5) {
setSpeed(speed);
delay(1000);
}
setSpeed(0);
delay(5000); // stop the motor for 5 seconds
}