Welcome to hell
libraries we use stepper drivers https://github.com/mertwhocodes/mwc_stepper
stepper accelerations controls https://www.airspayce.com/mikem/arduino/AccelStepper/
encoder controls https://www.pjrc.com/teensy/td_libs_Encoder.html
Tutorials followed Multithreading https://randomnerdtutorials.com/esp32-dual-core-arduino-ide/
Core 0 will be used for motor logic websocket
Core 1 interrupt code