I am trying to use simple foc for a wheeeled rover but the initalisation it does on startup is a problem. is there a simple way to detect the hall sensor values then write them into the code?
Hey @geofrancis,
You can skip the direction check (the part of the init when the motor moves) if you provide the motor with the sensor direction. And the init should be a bit more repetitive if you use the hall sensor without interrupts.
// set the direction
motor.sensor_direction = Direction::CW; // CW or CCW
// then call initFOC()
motor.initFOC();