I am controlling a g-series 1000kv brushless motor with my arduino. Currently I have my setup as follows: enter image description here Now I used the code given to me in a tutorial which is also as seen below:

#include <Servo.h>
Servo ESC;     // create servo object to control the ESC
int potValue;  // value from the analog pin
void setup() {
  // Attach the ESC on pin 9
  ESC.attach(9,1000,2000); // (pin, min pulse width, max pulse width in 
void loop() {
  potValue = analogRead(A0);   // reads the value of the potentiometer (value between 0 and 1023)
  potValue = map(potValue, 0, 1023, 0, 180);   // scale it to use it with the servo library (value between 0 and 180)
  ESC.write(potValue);    // Send the signal to the ESC

at any voltage (tested between 7.4v and 12v) i was not able to change the spin speed despite my knowledge being voltage x 1000 is the rpms. I want to run a piece of code that will spin the motor slowly but no solution is working.

  • So, does your motor spin at all? Did you carry out ESC's arming sequence? Also, are you powering your Arduino from the BEC built into the ESC?
    – AnT
    May 12 '19 at 5:05
  • Arduino is powered from the BEC but sometimes from computer so it is a little of both. And yes I carried out the arming sequence May 12 '19 at 14:35
  • And the motor does spin just starts off really fast May 12 '19 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.