Esp32 ignores the search for the encoder index

BLDCMotor motor = BLDCMotor(15);
BLDCDriver3PWM driver = BLDCDriver3PWM(25, 26, 27, 7);

// encoder instance
Encoder encoder = Encoder(4, 2, 600, 33);
                                                                                                                                                                                                                        
// Interrupt routine intialisation
// channel A and B callbacks
void doA(){encoder.handleA();}
void doB(){encoder.handleB();}
void doI(){encoder.handleIndex();}
// angle set point variable
float target_angle = 0;
// instantiate the commander
Commander command = Commander(Serial);
void doTarget(char* cmd) { command.scalar(&target_angle, cmd); }

void setup() {

  // initialize encoder sensor hardware
  encoder.init();
    encoder.enableInterrupts(doA, doB, doI);

  // link the motor to the sensor
  motor.linkSensor(&encoder);

  // driver config
  // power supply voltage [V]
  driver.voltage_power_supply = 24;
  driver.init();
  // link the motor and the driver
  motor.linkDriver(&driver);

  // aligning voltage [V]
  motor.voltage_sensor_align = 3;
  // index search velocity [rad/s]
  motor.velocity_index_search = 3;

hello. does esp32 support the encoder index?

Hi @nikolaewich1988,

For the Encoder class, the implementation is based on interrupts, and it doesn’t matter which MCU you use. If the encoder has an index pin, and you configure it correctly, it should work on any MCU.

Which ESP32 are you using? Does it work if you use a different pin than GPIO33?

sorry to disturb There was an error in connection on my part ((((