Brushless motor algorithm

At any one time, you drive the current into one coil and out of the other, leaving the third one floating - you measure the back emf on this coil to determine the rotor's position.