write.microseconds() inaccurate?

Hey, so since i the servo.write function, for some reason, doesnt work for me, i decided to use the milliseconds function, in order to control my servo motor. The thing is, the motor only moves when the the number in the brackets is devidable by 50, for expample the solwest i can do is 1550, then 1600, 1650 and so on.

Is it supposed to work like that? since it seems a bit inaccurate...

Not only inaccurate, completely non-existent.

Please post your code and then frame your question around it.

.

6abe90a239.png

Please post your code.

#include <Servo.h>//Using servo library to control ESC

int val=0; //Creating a variable val

Servo esc1; //Creating a servo class with name as esc

void setup()
{

esc1.attach( 8 ); //Specify the esc signal pin,Here as D8

Serial.begin(9600);
}

void loop()
{
esc1.writeMicroseconds(1550);
delay(300);
esc1.writeMicroseconds(1600);
delay(300);
esc1.writeMicroseconds(1500);
delay(300);

}

OP:
See how much nicer your code looks when posted like this:

#include <Servo.h>//Using servo library to control ESC

int val = 0; //Creating a variable val

Servo esc1; //Creating a servo class with name as esc

void setup()
{

  esc1.attach( 8 );   //Specify the esc signal pin,Here as D8

  Serial.begin(9600);
}

void loop()
{
  esc1.writeMicroseconds(1550);
  delay(300);
  esc1.writeMicroseconds(1600);
  delay(300);
  esc1.writeMicroseconds(1500);
  delay(300);

}

Much easier to copy and paste right into the Arduino IDE too. Please use Code Tags.

Hi HySone,
At the top of every forum here is a sticky post names "How to use this forum - please read"
Go read it. It will help you get help from others if you follow the basic guidelines.

Which ESC are you using?
How are you measuring the result of writeMicroseconds?

I suspect that writeMicroseconds is working exactly as designed. Some ESCs have limited granularity in their speed control. Or maybe the ESC does make small changes with smaller increments in the writeMicroseconds parameter, but you don't notice that change.

Tell us more about what you are trying to do.

Did you remember to calibrate your ESC?