How to control hub motor with kkmoon controller and arduino uno

I salvaged segway motor with 8 wires. I did completed basic connection of 5 hall sensors and power from 36V lipo battery in the image below. When I connect self-learning wires then motor starts rotating so connecting must be right. So now how do I control the motor with arduino?

Controller is kkmoon motor regulator 350W - link

didn't find datasheet about motor but here are some Information:-
Type: BLDC Motor
Voltage: 36V
no. of wires:- 8 (3 wires for 3 phase, 5 for hall sensor)
Power:- 300W