Updated Arduino code