Very unstylish code that runs the Arduino in two modes, manual and auto. Starts in manual mode by default.