Hi everyone. i have to increase the speed of my brushless motor to lift up the helicopter . i need to check if i can do anything to my code below to increase the speed? which part below is link to the speed rpm?
#include <Servo.h>
Servo myservo;
Servo myservo1;// create servo object to control a servo
int potpin = 120;
int potpin1=150;// analog pin used to connect the potentiometer
int val;
int vall;// variable to read the value from the analog pin Use the analog joystick to throttle the helicopter
void setup()
{
myservo.attach(9);
myservo1.attach(10);
// attaches the servo on pin 9 to the servo object
}
void loop()
{
val = analogRead(potpin); // reads the value of the potentiometer (value between 0 and 1023)
val = map(val, 90, 1023, 90, 179);
vall=analogRead(potpin1);
vall=map(vall,90,1023,90,179); // scale it to use it with the servo (value between 0 and 180)
myservo.write(val); // sets the servo position according to the scaled value
delay(5);
myservo1.write(vall);
delay(5); // waits for the servo to get there
}
#include <Servo.h>
Servo myservo;
Servo myservo1;// create servo object to control a servo
int potpin = 120;
int potpin1=150;// analog pin used to connect the potentiometer
int val;
int vall;// variable to read the value from the analog pin Use the analog joystick to throttle the helicopter
void setup()
{
myservo.attach(9);
myservo1.attach(10);
// attaches the servo on pin 9 to the servo object
}
void loop()
{
val = analogRead(potpin); // reads the value of the potentiometer (value between 0 and 1023)
val = map(val, 90, 1023, 90, 179);
vall=analogRead(potpin1);
vall=map(vall,90,1023,90,179); // scale it to use it with the servo (value between 0 and 180)
myservo.write(val); // sets the servo position according to the scaled value
delay(5);
myservo1.write(vall);
delay(5); // waits for the servo to get there
}