Implementation of line following logic based on sensor data