Main Sailing code for Arduino