Can someone please help me on how to reduce the speed of the brushless motor? Iam using 2 pairs of A2212/10T/13T 1000KV Brushless Motor along with SimonK 30A ESC.I am using this motor to drive the boat which is made of foam boat.But the 1000KV motor is very fast to drive the boat.So I want to reduce the speed of the motor so that I can move the boat at a slow speed.can anyone help me with this? The following code I'm using:
/*
- This Code is Only for personal Purpose only
- This Is a self written code by Founder of beginnertopro.in Mr.Sai Tat Sat Mishra
- www.beginnertopro.in
*/
char data = 0; //Variable for storing received data
const int lm1=7;
const int lm2=6;
const int rm1=5;
const int rm2=4;
void setup()
{
Serial.begin(9600); //Sets the baud for serial data transmission
pinMode(lm1,OUTPUT);
pinMode(lm2,OUTPUT);
pinMode(rm1,OUTPUT);
pinMode(rm2,OUTPUT);
}
void loop()
{
if(Serial.available() > 0) // Send data only when you receive data:
{
data = Serial.read(); //Read the incoming data & store into data
Serial.print(data); //Print Value inside data in Serial monitor
Serial.print("\n");
if(data=='F'){
front();
}else if(data=='B'){
back();
}else if(data=='L'){
left();
}else if(data=='R'){
right();
}else if(data=='S'){
Break();
}
}
}
void front(){
Serial.println("Forward Move");
digitalWrite(lm2,HIGH);
digitalWrite(rm2,HIGH);
digitalWrite(lm1,LOW);
digitalWrite(rm1,LOW);
}
void back(){
Serial.println("Back Move");
digitalWrite(lm1,HIGH);
digitalWrite(rm1,HIGH);
digitalWrite(lm2,LOW);
digitalWrite(rm2,LOW);
}
void left(){
Serial.println("Left Move");
digitalWrite(rm2,HIGH);
digitalWrite(rm1,LOW);
digitalWrite(lm1,HIGH);
digitalWrite(lm2,LOW);
}
void right(){
Serial.println("Right Move");
digitalWrite(lm2,HIGH);
digitalWrite(lm1,LOW);
digitalWrite(rm1,HIGH);
digitalWrite(rm2,LOW);
}
void Break(){
Serial.println("Break");
digitalWrite(lm2,LOW);
digitalWrite(lm1,LOW);
digitalWrite(rm1,LOW);
digitalWrite(rm2,LOW);
}