Haptic interface using brushless motor and FOC

its PWM, the code is a mess, but I will try to clean it an post it somewhere, keep in touch!