Trouble coding for an obstacle avoiding robot