Updated Arduino code for new hardware