#include Servo ESC; // create ESC object to control a servo // twelve servo objects can be created on most boards int PulseRate = 1200; // variable to store the BLDC pulse rate. void setup() { ESC.attach(PIN_PA3, 1000, 2000); // attach Signal pin to arduino pin 6, set minimum pulse width and maximyum pulse width in microseconds). } void loop() { if(Serial.available()){ PulseRate = Serial.read(); ESC.write(PulseRate); // tell servo to go to position in variable 'pos' delay(500); // waits 1s } }