Updated the main Arduino loop