This is the code for the Communication code between the Mega and the APM