Arduino code – BLDC motor

The code below can be used to control a brushless motor with an Arduino uno and a potentiometer. For instructions on how to used this, please follow the video tutorial below. LINK

Additionally, check out BRILLIANT CLICK HERE for STEM courses

#include <Servo.h>

Servo ESC; 

int Speed; 

void setup(){
ESC.attach(9,1000,2000);
}

void loop(){
  Speed = analogRead(A0);
  Speed = map(Speed, 0, 1023, 0, 180);
  ESC.write(Speed);
}

Did you find the tutorial useful? Please tell a friend and help us grow!