Programming Hobbywing XRotor Micro 60A

Hi Folks. I am trying to program my Hobbywing XRotor Micro 60A 4in1 ESC. I am having a hard time finding any info online.
I did find that I need to give a HIGH throttle and then a LOW throttle to arm the ESC. That seems to be successful from the beeps that the ESC is making. The beeps are confirming that the ESC is indeed powering up.
The issue is that the motor doesn't spin as it is being told to spin in the code that is in 'loop'.

Can someone tell me how to make this motor spin? Ty

void setup() {
pinMode(9,OUTPUT);
analogWrite(9, 240);
analogWrite(9, 2);
}

void loop() {
analogWrite(9, 180);
delay(1000);
analogWrite(9, 64);
delay(1000);
analogWrite(9, 180);
delay(1000);
analogWrite(9, 64);
delay(1000);
}

ESC's generally use Servo signals, not PWM.

#include <Servo.h>

Servo ESC;

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

  // Arm:
  ESC.writeMicroseconds(2000); // Full speed
  delay(100);
  ESC.writeMicroseconds(1000); // Off
  delay(100);
}

void loop() 
{
  ESC.write(180);  // Full speed
  delay(1000);
  ESC.write(64);
  delay(1000);
  ESC.write(180);  // Full speed
  delay(1000);
  ESC.write(64);
  delay(1000);
}

You can use ESC.writeMicroseconds() with a range of 1000 to 2000 to get more resolution or use ESC.write() with a range of 0 to 180.

You may find that you need to calibrate your ESC.

See

for details and other things to consider.

HTH

a7

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.