Update code for new Arduino software