 TinyGPSPlus gps;
 Data_module dataModule(sdChipSelect, debugSerialBaud, initFileName, dataFileName);
 Sensor_helper helper(Ascale, Gscale, Mscale, Mmode, &dataModule); // Data_module required for sensor debug
+RF22 rf22(radioChipSelect, radioIntPin);
 // end region
 
 void setup() {


// region pin definitions
#define radioIntPin 0
#define gyroIntPin 1
#define buzzerPin 3
#define gyroChipSelect 4
#define radioChipSelect 5
#define sdChipSelect 6
// end region


  // begin I2C for MPU IMU
  Wire1.begin(I2C_MASTER, 0x000, I2C_PINS_29_30, I2C_PULLUP_EXT, I2C_RATE_400);

  // begin serial used for GPS and ESP
  gpsSerial.begin(gpsSerialBaud);
  espSerial.begin(espSerialBaud);

  // Sensor setup
  setupIMU();
  // Radio setup
  setupRFM();
  // WiFi setup
  setupESP();
  // GPS setup
  setupGPS();

  // Notify dataModule to flush init buffers
  dataModule.initComplete();
  // Print CSV layout to file
  dataModule.println(csvLayout);
}

void loop() {
  // get information from sensors and GPS
  readGPS();
  readIMU();

  // Print all information
  dataModule.print(getIMULogString(accelData)+getIMULogString(gyroData)+getIMULogString(magData));
  dataModule.println(getGPSLogString());
}

// ------------------------------------------------------------
