collect data to detect pins direction