Controlling a DC Motor through the Pi

Xojo is not the best option to work with GPIO but if you really want to do it, there is a book about this: