 float scale(int16_t value, float scale_factor) {
   return value / scale_factor;
 }
+
+void statusLight(bool state) {
+  digitalWrite(GREEN_LED, state ? HIGH : LOW);
+  digitalWrite(RED_LED, state ? LOW : HIGH);
+}

  Serial.print("\t");
  Serial.print(scale(gz, GYRO_SCALE));
  Serial.print("\t");
  
  // TODO: complete this.
  // write raw magnetometer values (??)
  Serial.print(mx);

#include "MPU6050.h"

MPU6050 imu;

// Status LEDs.
#define GREEN_LED 7
#define RED_LED 8

// Set the full scale range for the components of the IMU.
#define ACCEL_FULL_SCALE_RANGE MPU6050_ACCEL_FS_8
