Speed Controller with break and reverse problem!

Hi,

i have a speed controller with brake and reverse (Nosram hawk reverse). And I trying to run motor using mymotor.write(random value between 0 - 200); ,but speed controller only squeaks.

How to fix it?

Thanks for your help :D

You don't use PWM with an ESC, they are just like servos so use the Servo library.

I’m using servo library.

It’s code which I use:

#include <Servo.h>

Servo myMotor1;

void setup()
{
myMotor1.attach(9);

Serial.begin(9600);

}

void initialize_motor()
{
myMotor1.write(5);
delay(4000);

myMotor1.write(180);
delay(4000);

myMotor1.write(10);
delay(2000);
}

void testfunction()
{

Serial.print(“1st Speed = 30, speed will increase in 3sec \n”);
myMotor1.write(30);
delay(3000);

Serial.print(“2nd Speed = 40, speed will increase in 3sec \n”);
myMotor1.write(40);
delay(3000);

Serial.print(“3th Speed = 50, speed will increase in 3sec \n”);
myMotor1.write(50);
delay(3000);

Serial.print(“4th Speed = 60, speed will increase in 3sec \n”);
myMotor1.write(60);
delay(3000);

Serial.print(“5th Speed = 70, speed will increase in 3sec \n”);
myMotor1.write(70);
delay(3000);

Serial.print(“6th Speed = 80, speed will increase in 3sec \n”);
myMotor1.write(80);
delay(3000);

Serial.print(“7th Speed = 90, speed will increase in 3sec \n”);
myMotor1.write(90);
delay(3000);

Serial.print(“8th Speed = 100, speed will increase in 3sec \n”);
myMotor1.write(100);
delay(3000);

Serial.print(“9th Speed = 120, motor will stop in 3sec \n”);
myMotor1.write(120);
delay(3000);

Serial.print(“9th Speed = BURST, motor will stop in 2sec \n”);
myMotor1.write(170);
delay(1000);

Serial.print(“STOP”);
myMotor1.write(10);
}

void loop()
{
Serial.println(“initializing…”);
delay(1000);
initialize_motor();
testfunction();
while(1) { }
}

Problem Resolved. I connecting power wire into controller ESC input instead the blue and yellow power wire. Thanks for help!