Code to Arduino UNO and MEGA.