Arming a brushless motor controller connected to ESP8266
Posted: Sat May 22, 2021 9:47 pm
I am trying to control a brushless motor with WeMOS D1 ESP8266
The motor controller and motor specs are below:
https://www.ebay.com/itm/114619313561
A 11.1v LiPo battery powers both the controller and ESP8266 (VIN, GND, D9)
The motor controller user manual is here:
The wiring photo is here
Turning on the controller spins its fan. but the motor does not spin.
What is the arming procedure to get the beeps to get the motor started?
Here' some code:
The motor controller and motor specs are below:
https://www.ebay.com/itm/114619313561
A 11.1v LiPo battery powers both the controller and ESP8266 (VIN, GND, D9)
The motor controller user manual is here:
The wiring photo is here
Turning on the controller spins its fan. but the motor does not spin.
What is the arming procedure to get the beeps to get the motor started?
Here' some code:
Code: Select all
#include <Servo.h>
Servo ESC1;
int pos = 0; //Sets position variable
void arm(){
setSpeed(0); //Sets speed variable
delay(1000);
setSpeed(90); //Sets speed variable
delay(1000);
setSpeed(135); //Sets speed variable
delay(1000);
setSpeed(0); //Sets speed variable
delay(1000);
}
void setSpeed(int speed){
int angle = map(speed, 0, 100, 0, 180); //Sets servo positions to different speeds
ESC1.write(speed); //angle
}
void setup() {
ESC1.attach(2); //Adds ESC to certain pin. GPIO2 is pin 9
arm();
}
void loop() {
int speed; //Implements speed variable
for(speed = 0; speed <= 70; speed += 5) { //Cycles speed up to 70% power for 1 second
setSpeed(speed); //Creates variable for speed to be used in in for loop
delay(1000);
}
delay(4000); //Stays on for 4 seconds
for(speed = 70; speed > 0; speed -= 5) { // Cycles speed down to 0% power for 1 second
setSpeed(speed); delay(1000);
}
setSpeed(0); //Sets speed variable to zero no matter what
delay(1000); //Turns off for 1 second
}