How to configure brushless motors with position encoders?

I wrote some code using a hall sensor example and a quadrature encoder emulator and hacked it together, i only checked if it compiled but i never actually tested it.

https://github.com/geofrancis/hall-sensor-to-Quadrature-encoder-adapter.

The stock hoverboard controllers should be ideal for a balance bot, it’s essentially what they are designed to do.