Connect Microcontroller

Steps for connecting a 32-bit microcontroller (such as Teensy, Raspberry PICO, Arduino Due, or ESP32) to the BLDC driver board

Connecting Pins

Not all driver boards have current sensors

Initialize Driver Board Pins

Update the initialization at the start of the library to match the pin numbers of the MCU.

/* CS pin of the encoder */
#define CS_MAGNETIC_SENSOR_PIN    10

/* BLDCMotor (int pole-pairs): GB36-2 has 7 pole-pairs */
BLDCMotor _bldc = BLDCMotor(7);

/* BLDCDriver3PWM(IN1, IN2, IN3, EN) */
BLDCDriver3PWM _driver = BLDCDriver3PWM(21, 22, 23, 20);

Last updated