Moved Arduino output to be event driven