determining pin-outs of dc motors