updated arduino code to support new messaging scheme