Updated Arduino code with a manual mode controllable via DIP switches if a serial connection is not available.