I have created a simple program for my explorer bot.
It simply drives straight ahead until it detects an obstacle. Then it turns it`s head and measures the distance in each direction. It turns in the diretion where the greatest distance is measured. In case the distance is still below the threshold to continue it`s journey it turns a bit more each time to prevent getting stuck e. g. in corners.
Download the project code here