BLDC Motor with Arduino


Demo

Connections

There is a mistake from the reference article, the 5V pin at the middle of esc can be not connected to 5V of arduino mega, if esc is connected to the battery. So either ways of connections can be used.

Code


#include 
Servo ESC; 
void setup()
{
ESC.attach(11); 
}
void loop()
{
int throttle = analogRead(A1); 
throttle = map(throttle, 0, 1023, 0, 180); 
ESC.write(throttle);
}
    

References


  1. Brushless DC Motor with Arduino