More work on the Arduino code