Example Code for PPM Mode Control
Last revision 2026/01/27
It is compatible with standard aero-model PPM interface, and you can also set the value of the width and the amplitude of the pulse signal yourself. Values between the minimum value and the medium value stand for clockwise rotation, and those between the medium value and the maximum value stand for counter-clockwise rotation, while the medium value stands for stop. This code can be used to control the brushless motor driver in the PPM Mode.
Wiring Diagram

Other Preparation Work
make sure the toggle switches on the driver are in the right position for PPM Mode;
Sample Code
//Name: Sensorless BLDC Driver V1-example code in PPM Mode
//Version: v0.1;
//Author: Barry from DFrobot;
// This code can be used to control the brushless motor driver in the PPM Mode;
// Details in User manual;
// make sure the toggle switches on the driver are in the right position for PPM Mode;
#include <Servo.h>
Servo mymotor;
void setup()
{
mymotor.attach(9);
}
void loop()
{
mymotor.writeMicroseconds(2000); //motors rotating in clockwise direction with the highest speed;
delay(5000);
mymotor.writeMicroseconds(1000); //motors rotating in counter-clockwise direction with the highest speed;
delay(5000);
mymotor.writeMicroseconds(1500); //motors stop;
delay(5000);
}
Was this article helpful?
