   if(yaw == 0xFF) { // 0xFF represents 360 degrees
     yaw = 0; // This makes sense since 0 and 360 degrees are the same place
   }
+  IMU.closeSPI(); // End SPI transaction
+}
 
-  IMU.closeSPI(); // End SPI transaction
-  
-  // Transmit IMU data via ADF7242
+// Transmit IMU data via ADF7242
+void sendWirelessSensorData() {
   Tx.configSPI(); // Begin SPI transaction
   Tx.dummySPIWrite(); // Dummy write to force SPI Mode change
   delay(1);

  
  // Set interrupt pin on the MCU as an input and attach an interrupt
  pinMode(8, INPUT);
  attachInterrupt(8, grabSensorData, RISING);

}

void grabSensorData() {
  
  IMU.configSPI();  // Begin SPI transactions
  roll = (char)(IMU.regRead(ROLL_C23_OUT) >> 8);  // Read roll register and cast to char
  pitch = (char)(IMU.regRead(PITCH_C31_OUT) >> 8);  // Read pitch register and cast to char
  yaw = (char)(IMU.regRead(YAW_C32_OUT) >> 8);  // Read pitch register and cast to char

  // 0xFF is a reserved word used for data synchronization

  if(roll == 0xFF) { // 0xFF represents 360 degrees
    roll = 0; // This makes sense since 0 and 360 degrees are the same place
  }

void setup() {
  
  SPI.begin(); //Start SPI
  Serial.begin(115200); //Start USB Serial

  // ADIS16480 IMU configuration
  IMU.configSPI();          // Begin the SPI transaction
