Implements the collision detection logic and light intensity logic for the sensors present in the system.