Suggestions...

Changed the start pin approach to use an array as this is more flexible for integration with other projects.

Changed the do, while to a while loop to make it more concise and more conventional.