Position a brushless dc motor with encoder 12V

I have a brushless dc motor with encoder 12V and a Arduino Uno. This is my first project and I'm crawling here with all you giants here.

I can see how my motor should be wired to the Uno. https://www.dfrobot.com/wiki/index.php/FIT0441_Brushless_DC_Motor_with_Encoder_12V_159RPM |478x500 *Arduino GND to the power-

How can I move the motor so it will turn 72 degree every time I push button no.1 and stop at 360degree, then going backwards 72 degree every time I push button no.2 and stop at 0 degree.

The code is the hardest part for me, anyone got some time to help me. Is there some kind of software that can write the code.? have you seen a tutorial.? What is the code for this.?

Start with this:


and use it to turn on a led. Then go thinking about driving the motor

Scroll down on the page that you linked to. There is sample code there. :)

Looks like that "encoder" is just a single channel pulse generator, you can get RPM from it but not position. Appears to be 6 pulses per motor revolution and 270 per shaft rev, so if you counted 54 pulses that would be 72 degrees, but you would have to use the state of the direction pin to determine whether to add or subtract pulses to the count.