implemented blinking led functionality while avoiding obstacles