Updated Arduino code with comments.