Arduino code improvement.